Hi Sudheer,

Take a look at the Hibernate / Xdoclet  documentation:

http://xdoclet.sourceforge.net/xdoclet/tags/[EMAIL PROTECTED]
any-to-one__0__1_

You need a many to one tag in your Atuhor class.

The join is automatically created by hibernate.
So if you want to display the country an author has selected, you only need
to call author.getCountry().getName() to display country of an author.

For more details see:
http://www.hibernate.org/hib_docs/reference/en/html/mapping.html

Bye,

Peter

-----Ursprüngliche Nachricht-----
Von: sudheerp [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 6. August 2007 14:34
An: [email protected]
Betreff: [appfuse-user] newbie : Listing of collection-key column name


Hi,

  In my appfuse-jsf 1.9.4 application I have a drop-down country list (which
is loaded from a database table) to select when the user enter author
details.

countries
---------
id
country

author
------
id
name
country_id  // FK to country
.......         // Other details

  When I list the author details I want to list the country name along with
author details.
Should I use a JOIN and pull in the 'List getAuthors' function? How the
hibernate xdoclet tag will look like?
  
  Thank you.

Sudheer


--
View this message in context:
http://www.nabble.com/newbie-%3A-Listing-of-collection-key-column-name-tf422
3843s2369.html#a12015418
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 05.08.2007
16:16
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 05.08.2007
16:16
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to