-->
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: help needed ...
PostPosted: Mon May 09, 2005 1:50 am 
Newbie

Joined: Mon May 09, 2005 1:32 am
Posts: 7
Location: Bangalore
Hi,
I need to know whether is it possible to acces a property in a query without declaring it in my POJo class.Is theer a way to declare a proerty in the mapping xml file without declaring that property in the POJO class.For eg if i have an Employee class with id and name that maps to Employee table with id,name and role columns.My question is whether can i declare that role property in my mapping fileEmployee.hbm.xml without declaring that in the POJO clas and later use that in my query like select emp from Employee emp where emp.role=.Is it possible to access any column of the table without declaring or it in the POJO clas.Kindly help me pleez...In anticipation of a response as early as possible
Thank You


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 09, 2005 10:57 am 
Beginner
Beginner

Joined: Thu Sep 02, 2004 4:54 am
Posts: 24
I would say no cause where you execute the query with the epm.role, it will return an Employee raw with the role parameter (cause it's in the xml config file) and as the setter isn't there, an error will be send.
However, maybe you could do this by setting the lazy attribute in the xml config file of the role property to "true" saying that the role won't have to be load unless asked.
I dont' know the result without the setter method but it could be fun.
hope I helped you


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.