-->
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: Could not initialize Collection-JPA
PostPosted: Thu Oct 15, 2009 8:28 am 
Newbie

Joined: Wed Oct 14, 2009 10:50 am
Posts: 2
Hi,
In my DAO i have combined two tables and excecuted a query somethg like:
select object(obj) from POL pol,REQ req where pol.adc=req.adc and pol.inicd='133'

I have used EntityA having one to many relationship with EntityB like:
@OneToMany(mapped by="collection")
List<EntityB> ListInfo;
EntityB has ManyToOne relationship with EntityA(mapped by collection)
Now in the DAO i have executed the query. There is no exception. But while retrieving data from the List, i get
"SQLGrammerException:Could not initialize a Collection".

I am able to get values for EntityA but those List Values from EntityB could not be retrieved.

can anyone hlp me?


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.