Hibernate version: Nhibernate 1.2
Name and version of the database you are using: MSSQL 2005
Hello, I realize the topic isn't much to go off of (being as why I have had a lot of trouble trying to search for my issue)
Basically what is going on is that I have a table
ID
Type
ItemID
etc...
The ItemID is an id that will load one of two objects(tables), and the type is my discriminator value.
I dont want to subclass, I just want it to be a many-to-one paying attention the Type.
The problem that I am having of course is mapping this. I am not sure how to tell the mapping to discriminate on these. I know the discriminator value exists when subclassing, but I'd rather not do that. I need to update this table too as there are columns that need persisting due to the line items.
If anyone can offer up a suggestion, I would appreciate it.
Thanks.
|