Re: [hibernate-dev] Problem with setting boolean parameter

2012-12-17 Thread Oto Júnior
Yes Eric, this is a project/implementation detail. I wrote here just for a "extra-information" of my problem. But you're right. Thanks. ___ Oto Soares Coelho Júnior otojun...@gmail.com / ot...@dcc.ufmg.br Departamento de Ciência da Computação -

Re: [hibernate-dev] Problem with setting boolean parameter

2012-12-17 Thread Steve Ebersole
No, that is no longer possible. You have a boolean, you should set a boolean. On 12/17/2012 09:12 AM, Oto Júnior wrote: > Correct. > > In Hibernate 2, this example with 'q.setParameter( "isActive", 1 );' works ! > In Hibernate 4 doesn't work. > > Is there any way to make work in Hibernate 4 wit

Re: [hibernate-dev] Problem with setting boolean parameter

2012-12-17 Thread Oto Júnior
Correct. In Hibernate 2, this example with 'q.setParameter( "isActive", 1 );' works ! In Hibernate 4 doesn't work. Is there any way to make work in Hibernate 4 without modify the implementation of my method? (i.e. I want to use 'q.setParameter( "isActive", 1 );' ) Observation: In the database

Re: [hibernate-dev] Problem with setting boolean parameter

2012-12-17 Thread Steve Ebersole
Just to make sure I understand... You have a domain attribute that is boolean, but you want to treat it as a number? I.e.: @Entity class Listing { ... boolean active; } Query q = session.createQuery( "from Listing l where listing.active = :isActive" ); q.setParameter( "isActive", 1 );

[hibernate-dev] Problem with setting boolean parameter

2012-12-17 Thread Oto Júnior
Hi, I used Hibernate 2 in my software and now I'm using Hibernate 4. Before the version migration, the method Query.setParameter(p, 1) - [Integer values in boolean properties] - works well for setting boolean properties. Now, in Hibernate 4, doesn't work anymore. Anyone could help me? _