Hi,
I looked at ManyToAny relationship mapping and I would need similar functionality, but slightly different.
My case:
Table of primary keys:
A { id: long, className: javaClassName }
B { id: A ... }
Object B id column has the same id as A and reference is established on the database level.
We did a proof of concept on the MSSQL database - it is working. In this case the keys of a type A are descriptive (semantically) and I allways know what type a key is. If I have all the keys in a separate table I also can use this table as a registry, where I can allways found out what kind of object is behind some numeric key so I can have ManyToAny relationhips, but just with one field.
I've been struggling with Hibernate but I couldn't set all keys as they were supposed to be.
Hope I've been descriptive enough.
Any help appreciated.
Best regards, Bojan
_________________ http://www.objectverse.com http://www.alcyone.si http://blog.alcyone.si
|