tag:blogger.com,1999:blog-6038034264692630628.comments2023-04-11T14:28:06.126+02:00NOtherDevAdam Barhttp://www.blogger.com/profile/16605796098913600806noreply@blogger.comBlogger286125tag:blogger.com,1999:blog-6038034264692630628.post-91933329985054729722020-08-10T17:37:37.084+02:002020-08-10T17:37:37.084+02:00How can we configure custom generators in nhiberna...How can we configure custom generators in nhibernate mapping by code?I could get only out of the box generator.Ashwinihttps://www.blogger.com/profile/09926175237351120683noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-40049142484214722742019-09-02T16:54:20.952+02:002019-09-02T16:54:20.952+02:00Thank you very much Adam, I love what you wrote he...Thank you very much Adam, I love what you wrote here. Helped a lot in a transition period to Mapping.ByCodeAlexanderhttps://www.blogger.com/profile/06112776807608964938noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-80105497436487745312019-07-30T23:29:18.774+02:002019-07-30T23:29:18.774+02:00Shame? The guy helped developers from 2011 to 2016...Shame? The guy helped developers from 2011 to 2016 and you write "shame"? Adam Bar, congratulations on your dedication to helping people! A hug!Viníciushttps://www.blogger.com/profile/03310179291543220519noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-8956387765589532212019-06-06T08:20:32.803+02:002019-06-06T08:20:32.803+02:00how do I create this TK with "on delete casca...how do I create this TK with "on delete cascade" ? <br /><br />Im using like this but isn't creating with the "on delete cascade"<br /><br /> ManyToOne(o => o.Node, manyToOne =><br /> {<br /> manyToOne.Access(Accessor.NoSetter);<br /> manyToOne.Cascade(Cascade.All | Cascade.DeleteOrphans); <br /> manyToOne.Column("DefinitionNodeId");<br /> manyToOne.Fetch(FetchKind.Join);<br /> manyToOne.Lazy(LazyRelation.NoLazy);<br /> manyToOne.Cascade(Cascade.Persist.Include(Cascade.Remove));<br /> });Thiagohttps://www.blogger.com/profile/02749490781901689972noreply@blogger.comtag: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-24742043170798632612019-04-18T21:42:04.943+02:002019-04-18T21:42:04.943+02:00Can you add and delete elements with this class?Can you add and delete elements with this class?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-26998967114814852002019-03-03T16:37:50.617+01:002019-03-03T16:37:50.617+01:00Hi Adam..firstly thanks a lot for this blog withou...Hi Adam..firstly thanks a lot for this blog without which there was no way for me to get into it.<br /><br />I have a problem I am dealing with right now where there is a very complex object structure.<br /><br />I created a table per class hierarchy and same entity with exact same columns are used by multiple tables in my database.<br /><br />I created multiple class mapping files pointing to same entity but a different table but it is failing as with error stating entity is already mapped. Os there any way you can think of wlse I would have to create 12 empty implementation classes for every table to make it work. Please adviseAnonymoushttps://www.blogger.com/profile/18405950333688121256noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-86960380904587185252019-03-03T15:17:34.988+01:002019-03-03T15:17:34.988+01:00Hi Adam..firstly thanks a lot for this blog withou...Hi Adam..firstly thanks a lot for this blog without which there was no way for me to get into it.<br /><br />I have a problem I am dealing with right now where there is a very complex object structure.<br /><br />I created a table per class hierarchy and same entity with exact same columns are used by multiple tables in my database.<br /><br />I created multiple class mapping files pointing to same entity but a different table but it is failing as with error stating entity is already mapped. Os there any way you can think of wlse I would have to create 12 empty implementation classes for every table to make it work. Please adviseAnonymoushttps://www.blogger.com/profile/18405950333688121256noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-79571950318238234852018-10-31T21:44:49.535+01:002018-10-31T21:44:49.535+01:00This comment has been removed by a blog administrator.Anonymoushttps://www.blogger.com/profile/02308630622046707938noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-59560866842533201742018-10-19T19:17:01.346+02:002018-10-19T19:17:01.346+02:00I try do this... put an abstract at base class dec...I try do this... put an abstract at base class declaration, and Abstract(true) at base class mapping... And UnionSubclassMapping creates a table for base class only...Anonymoushttps://www.blogger.com/profile/10889082777620125870noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-83474025873118170812018-09-18T10:16:49.482+02:002018-09-18T10:16:49.482+02:00Interesting behaviour! Interesting behaviour! markoohyezzhttps://www.blogger.com/profile/13992022715739501147noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-34251837126766128282018-08-09T16:24:25.362+02:002018-08-09T16:24:25.362+02:00thanks for this clear explanation - especially whe...thanks for this clear explanation - especially when NH documentation is lacking in this regard Vivek Rathodhttps://www.blogger.com/profile/02531206517158034661noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-19034645604381897922018-08-02T12:55:58.130+02:002018-08-02T12:55:58.130+02:00The giant stuffed teddy bear means different thing...The giant stuffed teddy bear means different things to different people. For some it's a best friend, there to cry on when things get tough. For others it's a playmate that shares both great and small adventures. One thing is certain, however: a giant stuffed teddy bear is the perfect companion for anyone lucky enough to have one. There have been many theories as to why bears rub trees. Some have thought that female bears do it when they are ready to mate. Others have been of the mind that bears simply rub trees to give themselves a good scratch so as to get rid of parasites. <a href="https://eddytheteddybear.com/blogs/news/teddy-bear-names" rel="nofollow">adorable teddy bear names</a><br />MR MADhttps://www.blogger.com/profile/11006091473803841039noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-60040889720509899842018-01-21T14:48:39.329+01:002018-01-21T14:48:39.329+01:00Nice article, confirmed what I was looking for. I ...Nice article, confirmed what I was looking for. I totally aggree with you, it makes no sense that the values are added, maybe it is for avoiding non-settable properties by default. Who knows.<br /><br />Takes me a while to figure it out as I was using the serializer in a massively distributed system where the passed array was used as an idem-potency marker used in rare cases when transient errors occures... Was an hell of ride to tackle this simple case down :).<br /><br />As always, don't go forward until an issue is well understood and solved or you will definitely regret it in production. :)<br /><br />Congratz!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-55311629682253772742018-01-10T17:51:44.429+01:002018-01-10T17:51:44.429+01:00greatgreatfor ict 99https://www.blogger.com/profile/01234222908168002434noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-20882682297181190762017-12-08T06:28:03.041+01:002017-12-08T06:28:03.041+01:00greatgreatfor ict 99https://www.blogger.com/profile/01234222908168002434noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-35933273405702812262017-07-18T16:47:21.645+02:002017-07-18T16:47:21.645+02:00 Dim result = From u In mySession.Query... Dim result = From u In mySession.Query(Of CImagenes)()<br /> Group u.nombre By u.nombre Into g = Group<br /> Order By nombre<br /> Select nombreJulio Azocarhttps://www.blogger.com/profile/09501788489569453121noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-22813100933079195132017-05-29T12:13:06.012+02:002017-05-29T12:13:06.012+02:00Can you also show how to do the invalidate cache i...Can you also show how to do the invalidate cache if from external source?, e.g. a webapi call to the endpoint exposed by the project just for this purpose.<br />Anonymoushttps://www.blogger.com/profile/01425026338878538764noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-77276939525104158482017-01-09T22:27:20.173+01:002017-01-09T22:27:20.173+01:00I Have a problem, I have a FieldA that is present ...I Have a problem, I have a FieldA that is present in both classes (ClassA and ClassB)<br />but in ClassA this FieldA is nullable, and in ClassB FieldA is not nullable, how to do that? Using Table per subclass doesn´t allow that, you have to map the Attribute in the Base class!Danielhttps://www.blogger.com/profile/15165361685590144472noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-38564067423832898882016-11-30T02:15:02.507+01:002016-11-30T02:15:02.507+01:00There's no reason you couldn't write your ...There's no reason you couldn't write your own implementation of ILookup that is backed by a Dictionary>! That might make it easier to work with in some cases (such as deserialization).Erik Eckhardthttps://www.blogger.com/profile/09187680112940803740noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-81061104394964751422016-11-19T07:00:07.200+01:002016-11-19T07:00:07.200+01:00Have you had any experience in combining fluent nh...Have you had any experience in combining fluent nhibernate and byte-code mappings (preferably without exporting one of them to hbm.xml files first)? I want to keep existing fluent mappings but change some/add new with by-code mappings.<br /><br />Thanks for a great blog post series.GreenMoosehttps://www.blogger.com/profile/01055963208842134584noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-21018414900150860812016-11-19T06:59:41.152+01:002016-11-19T06:59:41.152+01:00Have you had any experience in combining fluent nh...Have you had any experience in combining fluent nhibernate and byte-code mappings (preferably without exporting one of them to hbm.xml files first)? I want to keep existing fluent mappings but change some/add new with by-code mappings.<br /><br />Thanks for a great blog post series.GreenMoosehttps://www.blogger.com/profile/01055963208842134584noreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-62389437645445212002016-09-06T12:56:24.405+02:002016-09-06T12:56:24.405+02:00it's a shame...it's a shame...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-76193892978255854232016-09-05T18:27:37.676+02:002016-09-05T18:27:37.676+02:00At out company we have an entire project devoted t...At out company we have an entire project devoted to removing nHibernate from our core applications.<br />Sounds nice uh? We have 5 programmers dedicated to this solely task.<br />Btw, we're moving to Entity Framework....<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6038034264692630628.post-340405072564977372016-08-31T22:51:53.392+02:002016-08-31T22:51:53.392+02:00In your experience with this approach, how does St...In your experience with this approach, how does StructureMap respond if 2 requests come close to the same time and both encounter the "cache miss"? Do both requests attempt to re-build the expensive cache? Or does StructureMap handle this cleanly such that the first request re-builds the cache and the second request just uses the cached information after it's been made available?Davidhttps://www.blogger.com/profile/00104149218384019315noreply@blogger.com