-->
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.  [ 5 posts ] 
Author Message
 Post subject: Map Entity property using HQL
PostPosted: Wed Jan 25, 2006 12:50 pm 
Newbie

Joined: Wed Jan 25, 2006 10:25 am
Posts: 3
hello,
I'm using Hibernate 3.1.1, Hibernate Annotations 3.1 beta 8
and try to map Entity property on HQL. I don't want using native SQL.
@Formula annotation work only with native SQL, @NamedQuery work with HQL (according documentation, i'm not try it), but i don't like to have HibbernateSession in Entity (NamedQuery can be get from HibernateSession). My question is whether exist any way to map Entity property (even with entity.hbm.xml file) using HQL?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 4:43 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I don't really know what you're talking about?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 5:33 pm 
Newbie

Joined: Wed Jan 25, 2006 10:25 am
Posts: 3
I just ask for some like @Formula annotation, but working with HQL.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 25, 2006 8:54 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
formula is meant to be an arternatice to column.
you you want to have calculated properties you can either do a plain projection in hql or directly work the computation at your java bean level (a getter doing the computation)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 26, 2006 4:38 am 
Newbie

Joined: Wed Jan 25, 2006 10:25 am
Posts: 3
10x, I prefer second variant.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.