开发者

NHibernate Query Generation

开发者 https://www.devze.com 2023-03-20 14:14 出处:网络
Some of the NHibernate queries are forming as below, I am just using the NHinernate Map files select installmen0_.Index as Index1_,installmen0_.accountnumber from Account installmen0_

Some of the NHibernate queries are forming as below, I am just using the NHinernate Map files

select installmen0_.Index as Index1_,installmen0_.accountnumber from Account installmen0_ where installmen0_.accountstatu开发者_运维问答s = 'active'

but I do not have any column called "Index" either in DB table or Map file, Where is NHibernate picking up this column? Please, sujjest where I might be wrong


it is the default columnname for list indexes. Probably you have mapped in Fluent Hasmany(...).AsList() or in xml <list name="mylist"></list>. it is used to persist the index of the element in the list. If you dont care in which order they are in the collection then use Hasmany(...).AsBag() or <bag name="mylist"></bag>

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号