This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 117693 - Needs support to refresh existing JPA with change in database schema
Summary: Needs support to refresh existing JPA with change in database schema
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 5 votes (vote)
Assignee: Sergey Petrov
URL:
Keywords:
: 138796 203257 (view as bug list)
Depends on:
Blocks: 122926
  Show dependency tree
 
Reported: 2007-10-03 19:45 UTC by Nam Nguyen
Modified: 2012-06-13 11:40 UTC (History)
6 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nam Nguyen 2007-10-03 19:45:42 UTC
Currently there is no support for iterative development with JPA.
We would like to see support for this specific use case: modification of existing entity classes to reflect new columns.
I believe other changes like removed column or changing data type are much less frequent.
Comment 1 Erno Mononen 2007-11-15 16:07:41 UTC
Probably this is concerns mainly the entities from db generator, so reassigning to Andrei. Anyway, we could provide 
some support for this in hints as well.
Comment 2 Nam Nguyen 2007-11-28 19:22:58 UTC
Is it possible that this feature be implemeted for 6.1 ?
Comment 3 Andrei Badea 2007-12-03 14:16:26 UTC
We can try to do at least the new columns for 6.1.
Comment 4 Dongmei Cao 2008-05-23 23:39:55 UTC
No plan to support this in NB 6.5
Comment 5 Sergey Petrov 2009-12-11 03:53:26 UTC
*** Bug 138796 has been marked as a duplicate of this bug. ***
Comment 6 GeraldoLuiz 2010-02-02 19:25:23 UTC
It's a very helpful feature, because every time I change the Db schema I have to manually change my entities, that were originally created by netbeans. 

When the entity itself is not changed manually, you may recreate it from start, but if you change it in any way, you loose all your customization code.

If you have a large number of entities it becomes a tiresome and error-prone task.

I hope it can be implemented in 6.9.

Geraldo.
Comment 7 fireantology 2010-03-29 20:54:49 UTC
Yes I hope too!
It's really a problem when I write personalized comparable,equal and other particular methods
Now I solve in this way: copy all source, delete the entity, refresh it from db and than paste code manually.
I can change manually the fields, but when table are to big or change are enough I spent much time.
Comment 8 David Konecny 2010-11-08 00:04:22 UTC
This is (partially?) implemented Sergey, right?
Comment 9 Sergey Petrov 2011-11-24 09:32:49 UTC
In this area there is always something more to implement, but currently we have some ability to update entities and some changes from db will propagate.
Comment 10 Sergey Petrov 2012-02-09 19:08:59 UTC
*** Bug 203257 has been marked as a duplicate of this bug. ***
Comment 11 Sergey Petrov 2012-06-13 11:40:40 UTC
initial request was regarding new columns - > resolved, aslo more specific requests need to be filed if required instead of general "need to support update" i.e. what exactly need to be done except new columns.