Comments (4)
I'm sorry, but I can't see any issue here. What is your question?
from org.fastnate.
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.
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.
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)
- ArrayIndexOutOfBoundsException when using SINGLE_TABLE and ConnectedStatementsWriter HOT 1
- Support @Resource in DataProvider HOT 1
- Support spatial properties
- Support java 8 local time api HOT 2
- ConnectedStatementsWriter does not respect autocommit=false of given connectionn HOT 1
- Support for Hibernate property "globally_quoted_identifiers" HOT 1
- Fastnate generating table even if Hibernate does not. HOT 2
- Attribute name bug on mapped property HOT 3
- InheritanceType.JOINED bug HOT 5
- AssociationOverride with JoinColumns defined in the JoinTable are ignored HOT 1
- Schema name doesn't get appended in the SQL statements HOT 6
- Fastnate - Spring Boot Generate the whole schema based on the entities HOT 6
- Support to create Liquibase XML file HOT 1
- Support annotation GenericGenerator HOT 4
- Support Embeddable in Collection of Embeddables HOT 1
- [Question] Is there anyway to do it using gradle instead? HOT 1
- [Question] Is it possible not to generate te relations? HOT 1
- DiscriminatorColumn+ DiscriminatorValue: A value for B_TYP was assigned twice HOT 2
- [Question] Is it possible to force write entities which already have an id? HOT 4
- Can't override table of an @ElementCollection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org.fastnate.