-->
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: How to correspond a boolean with a Tyniint?
PostPosted: Wed Jan 26, 2005 6:44 am 
Newbie

Joined: Mon Jan 24, 2005 9:48 am
Posts: 6
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 2.1.7

Full stack trace of any exception that occurs:
exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.a2a.security.users.UserImpl.setActive
at com.a2a.security.users.dbprovider.UserDBProvider.getUserList(UserDBProvider.java:130)
at com.a2a.security.users.dbprovider.UserDBProvider.getUserList(UserDBProvider.java:215)
at com.a2a.security.users.UserProviderFactory.getUserList(UserProviderFactory.java:152)
at com.a2a.security.users.testusers.TestUserDBProvider.testGetList(TestUserDBProvider.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)


Name and version of the database you are using:MySQL 4.0.20


I would like know.How to make correspond a type boolean (Java) with a TyniInt(MySQL) type?

My hbm.xml:

<class name="com.a2a.security.users.UserImpl" table="T_PERSONNE">

<id name="id" type="int" column="PERSONNEID">
<generator class="native"/>
</id>
<property name="login">
<column name="NOMUTILISATEUR" sql-type="VARCHAR(255)" not-null="true"/>
</property>

<property name="password">
<column name="MOTDEPASSE" sql-type="VARCHAR(255)" not-null="true"/>
</property>
<property name="firstName">
<column name="NOM" sql-type="VARCHAR(255)"/>
</property>
<property name="lastName">
<column name="PRENOM" sql-type="VARCHAR(255)"/>
</property>
<property name="mail">
<column name="EMAIL" sql-type="VARCHAR(255)"/>
</property>
<property name="active">
<column name="ACTIVE" sql-type="TINYINT(1)"/>
</property>
<dynamic-component name="properties">
<!--property name="adresse" type="java.lang.String" column="adresse"/-->

</dynamic-component>
<list name="groups" table="T_PERSONNEGROUPE" cascade="none" inverse="true" lazy="true">
<key column="PERSONNEID"/>
<index type="int"/>
<many-to-many column="GROUPEID" class="com.a2a.security.users.GroupImpl"/>
</list>
<!--subclass name="com.a2a.security.users.UserImpl" /-->
</class>

Active is a boolean and correspond to tyniint in database.

_________________
Frouf


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.