|
Hi, I use Hibernate 2.0.5 and have a question about mapping,
in our business model we have a entity wich can be a child collection of many other entities, like attachment entity wich can be assignet to part as image, to invoice as pdf and so on.
normaly I have to add foreign key to attachment table for every parent entity and change every time the table.
my attempt is to save a entity class id, such as type name of entity, instead of foreign key for every parent entity and a parents object id.
how I can realize this in NHibernate ??? Can I map this or should I write my own geter functions and use criteria ?
best regards
Russlan A.
|