Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing JPA entity #871

Closed
devedipoint opened this issue Dec 12, 2014 · 1 comment
Closed

Changing JPA entity #871

devedipoint opened this issue Dec 12, 2014 · 1 comment
Milestone

Comments

@devedipoint
Copy link

Let's assume we have a Entity with fields and relationships with others. Now we cannot use entity generator to change this Entity (fields, relations) because:

  • it will overwrite existing classes and *.js
  • it will add next liquibase file like it would creating entity in contrast to make alter table. It causes exception with liquibase trying to add the same table again.
  1. It could detect if Entity exist and then fill existing fields and relationships, to enabling changes.
  2. Generator can detect what is changing by diff. On this basis, we can detect if a field is :
  • added
  • modified
  • removed

and add this information to liquibase changeset. The same is with relationship and extending classes.

What do You think?

@jdubois
Copy link
Member

jdubois commented Dec 13, 2014

  • This has changed in the v2.0.0 version, as we will "remember" the entity when you run it again. But still, the basic issue still exists.
  • On the Java part I'm not too worried: people can just code it, if it's just adding a field we don't provide much value. Otherwise we need to have some comment somewhere so we know where to add the code (like here)
  • The real issue is Liquibase: it's the most complicated and annoying part. And for this, at the moment, I have this solution Add a maven goal to run "Liquibase Hibernate" #754

-> this is one of the latest issues for v2.0.0, I have great hopes for it. Besides, I've seen it has been improved since I last worked on it.
So my goal is to focus on this, that's why I'm closing your ticket:

  • if you don't think it's a good idea, don't hesitate to re-open it
  • if you think it's a good idea, help is welcome to work on this ticket, as it's taking a lot of time, and it's quite complex to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants