tag:blogger.com,1999:blog-6038034264692630628.post2265267923500405823..comments2023-04-11T14:28:06.126+02:00Comments on NOtherDev: NHibernate's Mapping by Code - first impressionsAdam Barhttp://www.blogger.com/profile/16605796098913600806noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-6038034264692630628.post-58129600921694353542019-05-15T22:55:03.894+02:002019-05-15T22:55:03.894+02:00That link goes nowhere. Any chance you can tell me...That link goes nowhere. Any chance you can tell me how to do this?john.shttps://www.blogger.com/profile/17990693898619231302noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-36519609122678711072012-05-31T22:30:14.014+02:002012-05-31T22:30:14.014+02:00Rory - see for example here: http://www.rjp-softwa...Rory - see for example here: http://www.rjp-software.co.uk/2012/05/29/mapping-by-code-building-a-session-factory/Adam Barhttps://www.blogger.com/profile/16605796098913600806noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-47209928207530689852012-05-30T23:22:02.076+02:002012-05-30T23:22:02.076+02:00Correction:
Conventionally, you'd declared it...Correction:<br /><br />Conventionally, you'd declared it in the [hibernate-configuration] as [mapping assembly="CentralDataLayer" /], but this doesn't seem to work with mapping-by-code.Rory Dueckhttp://www.roydukkey.com/noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-52028946055853901212012-05-30T23:20:00.176+02:002012-05-30T23:20:00.176+02:00How do you get NHibernate to include mapping-by-co...How do you get NHibernate to include mapping-by-code in the configuration? Conventionally, you'd declared it in the as , but this doesn't seem to work with mapping-by-code.<br /><br />The Exception is: Unable to locate persister for the entity named 'NHibernate.Map.Employee'.Rory Dueckhttp://www.roydukkey.com/noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-73052924993926385782012-01-18T16:57:56.152+01:002012-01-18T16:57:56.152+01:00And here it is: http://notherdev.blogspot.com/2012...And here it is: http://notherdev.blogspot.com/2012/01/mapping-by-code-dynamic-component.htmlAdam Barhttps://www.blogger.com/profile/16605796098913600806noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-10281016595163351532012-01-10T11:24:32.636+01:002012-01-10T11:24:32.636+01:00I've not investigated this issue yet. Will try...I've not investigated this issue yet. Will try this week for sure and let you know.Adam Barhttps://www.blogger.com/profile/16605796098913600806noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-55303089023806531142012-01-10T10:29:23.989+01:002012-01-10T10:29:23.989+01:00Hi Adam,
Did you figure out how to map the dynami...Hi Adam,<br /><br />Did you figure out how to map the dynamic component?<br /><br />I tried using the following approach, but it seems unable to find the correct types.<br /><br />We can share some code if we can help each other out.<br /><br />I have mapped almost every situation now, besides dynamic components.<br /><br />Map(x => x.Attributes,<br /> mapping =><br /> {<br /> mapping.Key(k => k.Column("CustomerId"));<br /> mapping.Table("CustomerAttributes");<br /> },<br /> mapping => mapping.Element(k => k.Column("propertyName")),<br /> mapping => mapping.Element(k => k.Column("propertyValue")));<br /><br />M. Schopman - famschopman at gmail.comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-74987746362539671272012-01-06T23:27:24.612+01:002012-01-06T23:27:24.612+01:00I must agree 100% with you, the exact same feeling...I must agree 100% with you, the exact same feeling I got left with. The intention is good but it simply feels immature compared to FNH.Jonas Hovgaardhttp://jhovgaard.netnoreply@blogger.com