Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / April 2005

Tip: Looking for answers? Try searching our database.

What are the JBoss xdoclet tags for an unidirectional Customer-Address relation?

Thread view: 
Joost Kraaijeveld - 11 Apr 2005 03:20 GMT
Can anyone tell me what the xdoclet tags are for a unidirectional 1-1
relation between a Customer and an Address in JBoss?

TIA

Joost
Frank Langelage - 11 Apr 2005 06:49 GMT
> Can anyone tell me what the xdoclet tags are for a unidirectional 1-1
> relation between a Customer and an Address in JBoss?

Here it is (debit = customer and adres = address):
        /**
         * @ejb.interface-method
         * @ejb.relation
         *       name="Debit-Adres"
         *       role-name="1-debit-1-adres"
         *       multiple="no"
         *       target-multiple="no"
         *       target-cascade-delete="no"
         *       target-ejb="Adres"
         *       target-role-name="1-adres-1-debit"
         * @jboss.relation
         *       related-pk-field="adressNr"
         *       fk-column="adress_nr"
         * @jboss.relation-read-ahead strategy="on-find"
         */
        public abstract AdresLocal getAdres();
        /**
         * @ejb.interface-method
         */
        public abstract void setAdres( final AdresLocal adres );

Table debit has a field adress_nr as foreign key column.
Adres_nr is the primary key column for table adres.
Joost Kraaijeveld - 11 Apr 2005 21:03 GMT
Hi Frank,

> Here it is (debit = customer and adres = address):
>         /**
...

> Table debit has a field adress_nr as foreign key column.
> Adres_nr is the primary key column for table adres.
Thanks for the useful response.

Joost


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.