Giter VIP home page Giter VIP logo

Comments (4)

liefke avatar liefke commented on July 24, 2024

I'm sorry, but I can't see any issue here. What is your question?

from org.fastnate.

bajajyog avatar bajajyog commented on July 24, 2024

my question, is how to generate the update sql statement from Entity?.
Fastnate provides api to generate insert sql statement from entity.
Let me know if you need more info.

from org.fastnate.

liefke avatar liefke commented on July 24, 2024

Ah - you mean you want to to update an existing entity with Fastnate?

I'm sorry, but this is not possible at the moment. Fastnate is intended to import new entities (it works best when importing into an empty database). The UpdateStatement is used internally to push any additional updates that are needed during the import of such new entities, for example when two inserted entities reference each other.

But if you describe what you want to do in detail, maybe I could help you or add such functionality to Fastnate. I've already thought about simple updates like

Notes notes = sqlGenerator.find(Notes.class, id);
notes.setNote("123");
sqlGenerator.write(notes);

This would be easy to implement. The main problem is how to describe the reference to the existing entity. By id is the one which would work right away, but in most cases you don't know the id when you are "offline" and this is where the tricky part will start...

from org.fastnate.

liefke avatar liefke commented on July 24, 2024

As you didn't describe your problem any further, I guess that it is not that important. I've created an enhancement issue for updates in #19 - you can track that one if you like.

from org.fastnate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.