I think what you need is <dynamic-component> and a discovery step in your configuration to populate it with mappings.
On Apr 18, 5:09 am, tgmdbm <[email protected]> wrote: > Is it possible to use NHibernate with unknown table structures? > > i know *some* of the structure e.g. > > Id | Name | Description | CreatedOn ... > > So I could create an entity for those columns but there may be any > number of extra columns in the table which i will know at runtime but > not at start up when i create the SessionFactory. I essentially want > the extra columns to fill a Dictionary<string, object> where the key > is the column name. > > public class Entity { > public long Id { get; set; } > public string Name { get; set; } > public string Description { get; set; } > public DateTime CreatedOn { get; set; } > ... > public IDictionary<string, object> properties { get; set; } > > } > > any help is greatly appreciated. > > thanks in advance. -- 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.
