﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Hendry Luk commented on NHibernate Mapping - &lt;property/&gt;</title><description>Mapping to private auto property variable? Really? Why do we ever want to do that?
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment16</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment16</guid><pubDate>Tue, 14 Apr 2009 02:43:21 GMT</pubDate></item><item><title>Scott Muc commented on NHibernate Mapping - &lt;property/&gt;</title><description>Thanks Ayende, 
  
  
We don't have a dba... I'm the go to guy for all database stuff. In my opinion I would favour this computed count column since it would remove a lot of logic from the codebase and our database is small enough that the subquery wouldn't be much of a performance hit.
  
  
Working on some entities right now that can take advantage of this right now. Looking forward to seeing how it turns out.
  
  
Scott
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment15</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment15</guid><pubDate>Wed, 08 Apr 2009 16:30:29 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate Mapping - &lt;property/&gt;</title><description>Scott,
  
That depends on a lot of things, the size of the data, the efficiency of the subquery, what indexes you have, etc.
  
Take the SQL to your DBA, if he screams, it is probably going to be slow.
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment14</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment14</guid><pubDate>Wed, 08 Apr 2009 16:18:34 GMT</pubDate></item><item><title>Mahendra Mavani commented on NHibernate Mapping - &lt;property/&gt;</title><description>Frank
  
little amendment to Ayende's answer for your query about timestamp vs. version
  
- Yes they serve the same purpose and almost same. 
  
  
Only difference would be in very very high transactional app you might have rare case of two update happening at same millisecond. Depending upon your app's tolerance power this may or may not be issue. This is the reason why new recommendation is to go for incremental number i.e. version which will never fail even in above rare rare case
  
  
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment13</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment13</guid><pubDate>Wed, 08 Apr 2009 16:09:21 GMT</pubDate></item><item><title>Scott Muc commented on NHibernate Mapping - &lt;property/&gt;</title><description>I love short tutorials like this, thanks for the info!
  
  
I have a question about the formula attribute. I've run into the scenario where I will have a list of objects that have a child collection of related objects (eg BlogPost ---&gt; Comments). Is that subquery going to pose a problem if I have a page that lists a large collection of the parent objects and displays that counted property? 
  
  
For a lot of my entities I pre-compute the child collection count and store it in the database because I did not want to perform a join, or invoke lazy loading to obtain the child collect to retrieve its count.
  
  
I hope that makes sense to you. The solution might seem obvious to you, but I'm still a newb at NHibernate.
  
  
Thanks a lot for all your great work!
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment12</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment12</guid><pubDate>Wed, 08 Apr 2009 15:51:00 GMT</pubDate></item><item><title>G commented on NHibernate Mapping - &lt;property/&gt;</title><description>Thanks alot!
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment11</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment11</guid><pubDate>Wed, 08 Apr 2009 14:08:38 GMT</pubDate></item><item><title>Milton Pividori commented on NHibernate Mapping - &lt;property/&gt;</title><description>Great!
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment10</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment10</guid><pubDate>Wed, 08 Apr 2009 13:30:20 GMT</pubDate></item><item><title>Shawn commented on NHibernate Mapping - &lt;property/&gt;</title><description>Thanks for putting this up, it is nice to see it in such detail.
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment9</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment9</guid><pubDate>Wed, 08 Apr 2009 13:01:22 GMT</pubDate></item><item><title>Oll commented on NHibernate Mapping - &lt;property/&gt;</title><description>&gt;&gt; more will probably follow...
  
  
This is one of the most useful posts I've found for someone starting out with NHibernate. Please don't stop now!
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment8</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment8</guid><pubDate>Wed, 08 Apr 2009 12:20:03 GMT</pubDate></item><item><title>Diego Jancic commented on NHibernate Mapping - &lt;property/&gt;</title><description>Really cool guide! Hope you keep writing about it.
  
  
Althought, I think it would be much better to have it written in the official documentation (
[nhforge.org/.../index.html](http://nhforge.org/doc/nh/en/index.html#mapping-declaration-property))
  
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment7</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment7</guid><pubDate>Wed, 08 Apr 2009 04:08:33 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate Mapping - &lt;property/&gt;</title><description>Sven,
  
For that you usually need to use multi query instead
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment6</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment6</guid><pubDate>Tue, 07 Apr 2009 21:06:13 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate Mapping - &lt;property/&gt;</title><description>Frank,
  
It should be, yes.
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment5</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment5</guid><pubDate>Tue, 07 Apr 2009 21:04:45 GMT</pubDate></item><item><title>Sven commented on NHibernate Mapping - &lt;property/&gt;</title><description>Every time you open your (blog-)mouth about NHibernate I learn something new. Thank you !
  
  
BTW, in case you're running out of ideas with regard to NHibernate topics, I am especially keen on guidance with regard to eager fetching deep hierarchies (e.g. 4+ levels) for which NHibernate's behaviour (left join fetch or ICriteria's FetchMode.Eager) kills performance.
  
BTW2: big fan of NHibernate Profiler (yes we bought it :-) )
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment4</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment4</guid><pubDate>Tue, 07 Apr 2009 19:34:04 GMT</pubDate></item><item><title>Frank Quednau commented on NHibernate Mapping - &lt;property/&gt;</title><description>Well done, thanks! A minor question, are the version + optimistic locking semantics the same as with timestamp + optimistic locking? (legacy, i have no version, but a timestamp...)
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment3</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment3</guid><pubDate>Tue, 07 Apr 2009 19:21:58 GMT</pubDate></item><item><title>Jason commented on NHibernate Mapping - &lt;property/&gt;</title><description>learn something new every day!
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment2</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment2</guid><pubDate>Tue, 07 Apr 2009 18:09:53 GMT</pubDate></item><item><title>labilbe commented on NHibernate Mapping - &lt;property/&gt;</title><description>Thank you for this useful short tutorial!
</description><link>http://ayende.com/3936/nhibernate-mapping-property#comment1</link><guid>http://ayende.com/3936/nhibernate-mapping-property#comment1</guid><pubDate>Tue, 07 Apr 2009 17:26:45 GMT</pubDate></item></channel></rss>