From: Onur G. (JIRA) <nh...@gm...> - 2011-04-22 19:47:46
|
[ http://216.121.112.228/browse/NH-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20943#action_20943 ] Onur Gumus commented on NH-2665: -------------------------------- Sorry I use attributes normally. above case SomeEntity is a table actually also it is an entity with composite ids. The problem is Mapping validation process assumes if the many-to-one class has a composite id It must have two columns mapped. This check should be skipped if formula is used. I don't have test case right now but i will prepare one. > Formula on Many-to-one pointing to a composite-keyed entity don't work > ---------------------------------------------------------------------- > > Key: NH-2665 > URL: http://216.121.112.228/browse/NH-2665 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.2.0Alpha2 > Reporter: Onur Gumus > Priority: Major > > Hello, it seems the following mapping won't work > <many-to-one formula="(select top 1 id1, id2 from SomeEntity")/> > in this case id1 and id2 are composite Id's for SomeEntity. NHibernate will complain it was expecting two columns while validating the mapping. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |