Joined: Tue Mar 22, 2005 6:01 pm Posts: 13 Location: Sydney, Australia
|
Hi there,
I want to map a property in my class to an entity using a <many-to-one> relationship.
So far all the Many-To-One relationships i've used specify a column for the foreign key of the required entity. But in one case i actually want to specify a value (some instance of the primary key) rather than the foreign key column name.
So rather than looking up an entity based on the value in the foreign_key column. I want the entity retrieved based on the its primary key being equal to some value that i specify in the mapping file.
I'm hoping and guessing that this is possible. But i'm not sure how to do it.
Hope someone knows this and is kind enough to share their knowledge with me.
Thanks in advance.
Johnny
|
|