
Thursday May 25, 2006
A New Way of Creating EJB3 Entity Relationships in NetBeans 5.5
I have just checked in a new, cool feature requested by the users –
hints for defining entity relationships.
If there is a field/property of entity type ('Company' in the
example below) defined in another entity ('Employee') and it is not
annotated neither with the @OneToOne nor @ManyToOne annotation, it is
underlined and there are quick-fix actions for creating relationship
available:
If the newly defined field is a collection of entities it is possible
to create OneToMany and ManyToMany relationships instead.
Once a "create relationship" action is chosen, the user is presented a
dialog with options for selecting corresponding property at the
other entity:
The property can be either picked up from a list of existing
properties of matching type ('Employee' or collection of 'Employee',
depending on the kind of relationship), or created from scratch as in
presented example:
This feature is available is NB55 daily builds from today on. It is
not present in NB55 Beta release.
Posted by tomslot
( May 25 2006, 04:54:00 PM CEST )
Permalink