-->
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.  [ 4 posts ] 
Author Message
 Post subject: jboss-EJB-3.0_RC9-FD.zip query parameter problem
PostPosted: Mon Sep 18, 2006 7:04 am 
Newbie

Joined: Wed May 31, 2006 6:40 am
Posts: 19
Hibernate version:
jboss 4.0.4 ga says:
12:43:26,000 INFO [Version] Hibernate EntityManager 3.2.0.CR2
12:43:26,062 INFO [Version] Hibernate Annotations 3.2.0.CR2
12:43:26,078 INFO [Environment] Hibernate 3.2 cr4

i downloaded & install by ant the new release candidate 9 of jboss ejb3 package and there's a problem with parameter query:
i create a query:

Query queryToReturn = entityManager.createQuery(ejbQuery);

then i put the parameters... but since the upgrade i put 4 parameters in my query and it runs with 3 parameters only!!!! (and it crash because i'm expecting a single result and without a param i got 4 results)

i have a pic taken form eclipse debug: (after lunch i try to add the image) the map inside query implementations report correclty a size of 4, but there are 3 "top-level" map entry and 1 more "child" map entry inside one of the "top-level" map entry....

IMHO RC8 handles this coreclty but RC9 doesn't

P.S. rc9 installation needs a "all" jboss install configuration... next i try to do a clean installation

thanks in advice


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 19, 2006 4:51 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Code:
Query queryToReturn = entityManager.createQuery(ejbQuery);


That's it?
Give more code.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 25, 2006 4:27 am 
Newbie

Joined: Wed May 31, 2006 6:40 am
Posts: 19
alesj wrote:
Code:
Query queryToReturn = entityManager.createQuery(ejbQuery);


That's it?
Give more code.


I try to explain better...
first of all i had problem with RC9 version, then i switch back and now i'm using

Implementation-Version: JBoss EJB 3.0 RC7 - FD

(taken from manifest.mf of jboss-ejb3.jar)
and i have no more this trouble.

After i create query with the previuos code i set 4 parameters to my query with:

queryToReturn.setParameter(<paramName>,<paramValue>);

then i invoke

queryToReturn.getSingleResult()

because i'm expecting a single result, but i got an Exception because i had selected 4 records... i check the database... with the 4 parameters i set i had to select only one record.... for some reason seems that 1 parameter is lost!?!?!?

With eclipse debug i see that inside query implementations the map had 3 top level parameter.entry (key,value) and inside one of these there's one more parameter.entry (key,value)

thanks to all


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 10:46 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Answered in JBoss EJB3 forum

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.