hi,
If a table has two unique composite keys (for that matter,more than one), can they be included in the primary key class ? and mapping file of a domain object?
so that other domain objects may establish relationships (one-to-many or many-to-many or many-to-one)with any key they like..
suppose consider this scenario (these tables)
parent
======
id int
id1 int
name varchar
suppose one composite key here is (id,name)
and other is (id1,name)
so can we have two <composite-id> tags in the Parent domain object??
child
====
child_id int (refers id of parent)
child_id1 int (refers id1 of parent)
name varchar
suppose one composite key here is (child_id,name)
and other composite key can be (child_id1,name)
so in the Child domain object mapping also two <composite-id> tags,is it possible???
hope I am not asking a very weird question,
thanks for any help!!!
|