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.  [ 1 post ] 
Author Message
 Post subject: Problems while migrating from Hibernate 3.0 to 3.3
PostPosted: Wed Dec 17, 2008 3:38 am 
Newbie

Joined: Wed Dec 17, 2008 3:11 am
Posts: 2
Location: India
Hi all,

I have been involved in design & development of a very large educational ERP. Currently i have updated my hibernate version from 3.0 to 3.3. I faced some issues which i am listing out below.

1. I used to write queries like

Code:
"from Company as company where company.status=:status and company.city=:cityId"


I got error while executing this query, & from forums i have found that i have to provide "company.city.id" instead of "company.city". The query worked find when i changed accordingly. But the problem i have is, i have 100s of such queries. My question is, should i have to change all those queries or is there any options /settings which allow me to use my existing queries?

2. While fetching an embedded object (mapped using many-to-one association) if i query an object whose child object is null, i am getting an empty result. The query is like this,

Code:
"select company.id, company.name, company.city from Company as company where company.status=:status


in my case, "city" field might be empty for some Company objects. The same query worked fine with the previous version & if the object (Company) has a city, i am getting the result. Also if i remove "company.city" field from my select query, it returns result .

I have tried many options like fetch="join", not-found="ignore", etc. Is there any way to select even this null child record?

Thanks in advance for your comments on this.

_________________
--
Best Regards
Sharaf


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

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.