-->
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: Session.createQuery() Not Working Properly
PostPosted: Mon Mar 10, 2014 9:46 pm 
Newbie

Joined: Mon Mar 10, 2014 9:36 pm
Posts: 2
I have narrowed down the issue like this:

1. final String[] concreteQueryStrings = QuerySplitter.concreteQueries( hql, factory ); is invoked inside session.createQuery()
hql param passed to it is = FROM com.persistence.hibernate.pojo.CC WHERE ID = :ID

2. The above function returns and empty string array object. Therefore concreteQueryStrings = [];

3. Because of this length = concreteQueryStrings.length is 0;

4. Due to this the following two sad events happen.
parameterMetadata = new ParameterMetadata( null, null );
returnMetadata = null;

5. This is causing query.setParameter("ID", 5); to throw QueryParameterException.
This is obviously wrong. What is wrong with my HQL that is causing concreteQueries() to return blanks?

BTW I have hibernate 3.4.

THanks
-Anup


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.