-->
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.  [ 4 posts ] 
Author Message
 Post subject: POJO creation issue
PostPosted: Tue Jul 31, 2007 1:31 pm 
Newbie

Joined: Thu Jul 26, 2007 10:04 am
Posts: 5
Dear Tools Users,
I am trying to use the following hbm.xml file and trying to create a POJO. The POJO is created but equals and hashcode methods are absent from the java file. Any help is appreciated.

Thanks in advance.
--------

hbm file:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Jul 31, 2007 12:06:05 PM by Hibernate Tools 3.2.0.b9 -->
<hibernate-mapping>
<class name="PersonPOJO" table="Persons" schema="data" catalog="myCat">
<id name="personPojoId" type="java.lang.Long">
<column name="personID" />
<generator class="increment"></generator>
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
</id>
<property name="lastName" type="string">
<column name="LastName" length="50" />
</property>
<property name="firstName" type="string">
<column name="FirstName" length="30" />
</property>
<hibernate-mapping>

---
Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 31, 2007 2:45 pm 
Expert
Expert

Joined: Thu Jul 05, 2007 9:38 am
Posts: 287
Help with doing what exactly?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 01, 2007 11:24 am 
Newbie

Joined: Thu Jul 26, 2007 10:04 am
Posts: 5
Hi Schauder,
The equals() and hashcode() methods are not being created in th java file generated even though i am using meta tag for the id property in my hbm.xml file

Thanks,
The newbie


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 03, 2007 4:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so how are you trying to run the generation ?

and shouldn't those <meta> attribute be in the beginning of the <id>?

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

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.