Hi all. I'm a newbie to NHibernate.
I have a wrapper class, which is used to add metadata to the object it holds:
Code:
public class Data
{
public DateTime Time {get;set;}
public string Hostname {get;set;}
...
pubilc object ObjectData {get;set;}
}
There are several objects that can be stored in the ObjectData property.
Assuming that:
* each such an object should be O/R mapped, and
* the ideal database structure would be a table for each such internal object, that also include the wrapper class fields
What would be the best way to define the mapping?
(just to make things more simple and clear - I want to add meta data to simple, mapped objects. The metadata should be stored in another class, which happens to also include the stored class itself. In the DB, the metadata is ideally stored WITH the class table itself, and not in a table of its own, connected with a foreign key, but if it isn't possible - how can I define a foreign key that does not point to a specific class?)
Itai.