简体   繁体   中英

Read unknown additional fields with NHibernate

I have a table, which is mapped with NHibernate:

 Person
 ------
 Firstname
 Lastname

There is also a DTO which is called Person .

Now, there are possibilities, that there are more fields, than known at design-time. The user can add customer defined fields at runtime. In this case, there are generated additional fields to my table (this is historically and I cannot change this).

The "new" table is looking now like:

Person
------
Firstname
Lastname
IF_Field1
IF_Field2

Now, I am searching a way to get this values (from IF_Field1, IF_Field2 etc) with NHibernate into the DTO Person . For example as a Hashtable or something similar.

Is there a way to reach my goal?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM