I see a lot of examples that Hibernate use "id" to map a connection from other tables, 
but I run into a scenario that the mapping is not done by id, hence I run out of ideas.

Here is a simplified version of my problem:

Table CITY
{
   id AS NUMBER Primary key
   stateCode AS char(3)
   name ...
} 

Table StateLake
{
   stateCode AS char(3)
   lakeName As char (50)
   ...
   primary key (stateCode, lakeName)
}

Now in java, I want to get a list of lakes back when I call city.getLakes(). Can 
anyone help me on this please?

Thanks.



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to