-->
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: What is going on with Mysql "limit ?" binding value?
PostPosted: Fri Jun 18, 2010 1:29 pm 
Regular
Regular

Joined: Sun Feb 14, 2010 3:29 pm
Posts: 58
Location: USA
Hi here,

When I turned on the proper hibernate logging, I can see SQL statements and binding values. When I do a simple JPA/QL SELECT, Hibernates auto add a LIMIT ? to the SQL query, and binding for that value is not show in log. Does anyone know why that is?

Example of QL for "select e from Employee e where e.empNo = :empNo" where empNo=500002

Code:
13:21:19.896 [main] DEBUG org.hibernate.SQL -
    select
        employee0_.emp_no as emp1_0_,
        employee0_.birth_date as birth2_0_,
        employee0_.first_name as first3_0_,
        employee0_.gender as gender0_,
        employee0_.hire_date as hire5_0_,
        employee0_.last_name as last6_0_
    from
        employees employee0_
    where
        employee0_.emp_no=? limit ?
13:21:19.896 [main] TRACE org.hibernate.type.IntegerType - binding '500002' to parameter: 1
13:21:19.896 [main] TRACE org.hibernate.type.IntegerType - returning '500002' as column: emp1_0_


Thanks,
-- Zemian


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.