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 190988 - Refactor fields of an existing entity to an Embeddable Class
Summary: Refactor fields of an existing entity to an Embeddable Class
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-13 21:25 UTC by arungupta
Modified: 2012-02-13 13:42 UTC (History)
3 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 arungupta 2010-10-13 21:25:44 UTC
It would be nice if I can select some fields in a JPA entity class, say Refactor, and then be able to say "Convert to Embeddable".
Comment 1 Sergey Petrov 2010-10-13 21:28:46 UTC
thanks.
some thought also:
- May be allowed either for ids fields/properties only or for any with
warning/option regarding changes in non id fields.
- May be able to select existent embedded class with same columns
instead of new one generation
- May be applied to entire project for all entities with the same
columns set
- Do not forget to update all usages taking in mind embedded id can be
null and call to specific member isn't possible in this case when
separate columns can be null and accessed easily

Refactor menu seems to be a place for this functionality, except not
sure how to select several fields before call (at least in editor).

One more option: Refactor|Move to mapped superclass. May need to be filed separately.

>P2, even it have no much sense, we need to review enhancement from time to time, it may help.
Comment 2 arungupta 2012-02-13 13:13:53 UTC
Any updates ?
Comment 3 Sergey Petrov 2012-02-13 13:42:11 UTC
just look through recently but it seems relatively complex even from ui point of view as there are a lot of items in refactoring menu, it may require some ui redesign.