Tomasz Slota's Weblog
« November 2009
MonTueWedThuFriSatSun
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      
Today

XML

the links

Skype Me™!
View Tomasz Slota's profile on LinkedIn



All | NetBeans | Personal | Sun

20060525 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 Comments [0]

Trackback URL: http://blogs.sun.com/tomslot/entry/a_new_way_of_creating
Comments:

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed