Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Null Objects</strong></p> <p>Mapping to fields can be useful if you are implementing the <a href="http://en.wikipedia.org/wiki/Null_Object_pattern" rel="nofollow noreferrer">null object pattern</a> if your classes. As this cannot be performed (easily) when mapping to Properties. You end up having to store fake objects in the database. </p> <p><strong>HQL</strong></p> <p>I was unsure that with HQL queries you had to change the property names if you were using a field access approach. ie if you had <code>&lt;property name="FirstName" access="field.camelcase" /&gt;</code> I thought you could still write <code>"From Person where FirstName = :name";</code> as it would use the property name still.</p> <p>Further discussion on field strategies and Null object can be found <a href="http://forum.hibernate.org/viewtopic.php?t=980694&amp;postdays=0&amp;postorder=asc&amp;start=15" rel="nofollow noreferrer">here</a>.</p> <p><strong>Performance</strong></p> <p>In relation to performance of field vs property on <a href="http://jaychapman.blogspot.com/2007/11/nhibernate-access-performance.html" rel="nofollow noreferrer">John Chapman's blog</a> It appears there isn't much of an issue in performance with small-midrange result sets.</p> <p>In summary, each approach has certain perks that may be useful depending on the scenario (field access allows readonly getters, no need for setters, property access works when nothing special is required from your poco and seems to be the defacto approach. etc)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload