Greetings,
I would like to find the best way to map a simple hashtable to a
nHibernate object. Ive been looking around and cant find exactly what
Im looking for.
Basically I have a simple nHIbernate object thats like this:
public class Foo{
public string name;
public IDictionary settings = new IDictionary<string,string>();
}
the database looks like this:
create table foo { id int not null auto_increment, name varchar(20)
not null; }
create table foo_settings { fk_foo_id int not null, key varchar(20)
not null, value varchar(20) not null; }
simple right? what I dont want to do is make foo_settings into its
own first class object. Foo is the only dude that needs to know
anything about him, how to persist him, etc etc.
Im looking for what the hbm should look like. Do I use a <Map>? how
does that work with the foreign table?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---