-->
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: Simple Query problem
PostPosted: Wed Jul 07, 2010 11:02 pm 
Newbie

Joined: Wed Jul 07, 2010 11:13 am
Posts: 1
Hello,

I am trying to do a query using:

Product lProduct= (Product)this.mSession.load(Product.class, id);

Id field being the primary key

This does not return anything.

However, this Query query = this.mSession.createQuery("from Product"); returns all values.

I have show_sql turned on.

For the first statement is shows something similar to:

Hibernate: select product0_.productCode as productC1_1_, product0_.productName as productN2_1_, product0_.productLine as productL3_1_, product0_.productScale as productS4_1_, product0_.productVendor as productV5_1_, product0_.productDescription as productD6_1_, product0_.quantityInStock as quantity7_1_, product0_.buyPrice as buyPrice1_, product0_.MSRP as MSRP1_ from classicmodels.products product0_ WHERE .productID=?

It does not seem to populate the parameter.

Can anyone provide any troubleshooting techniques?

Thanks in advance,

Kevin


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.