These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Question: Hql queries when mapping to fields access="fi
PostPosted: Sat Aug 12, 2006 10:34 am 
Regular
Regular

Joined: Tue Feb 07, 2006 4:27 pm
Posts: 69
I am from the Java world where TOPLink for Java is one of the more popular (although expensive) ORM tools.

TOPLink allows you to map directly to private fields, and I have just updated my NHibernate mappings to do the same as I prefer that method.

I also noticed, once I did this I got a significant boost in performance.

When I write my Hql now though, I need to use the names of the private fields in my queries, which I don't like.

Is there a way to avoid this, but still map to the private fields?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 12, 2006 1:18 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Yes, use access="field.<naming-strategy>", see http://www.hibernate.org/hib_docs/nhibernate/html/mapping.html#mapping-declaration-property, table 5.2 for the complete list of naming strategies.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.