Multiple columns in DB primary key, mapped to hibernate, no corresponding properties in mapped class -
i have class (call "class c") table has 2 foreign keys (two other classes, "class a" , "class b"'s ids) make primary key in db. problem neither foreign key property of child class (we avoiding backpointers, used-by classes know uses them).
i can map <id column="class_a_id" type="long"/>, doesn't when have 2 keys. <composite-id> has have <key-property> or <key-many-to-one> both require "name".
any ideas on how can succesfully map without putting foreign ids in class?
i ended having use backpointers , changing design. bit ambitious.
Comments
Post a Comment