-->
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.  [ 5 posts ] 
Author Message
 Post subject: What is wrong with this mapping file.
PostPosted: Wed Apr 30, 2008 4:22 am 
Newbie

Joined: Tue Apr 29, 2008 7:09 am
Posts: 5
Location: Karachi
Mapping documents:

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<!-- This file has been generated by Salto-db Generator Ant v1.0.15 / Hibernate pojos and xml mapping files. at Wed Apr 30 12:10:46 PKT 2008 -->
<hibernate-mapping>
<class name="auction.dao.pojo.ProbidIphistory" table="probid_iphistory">

<property name="memberid" column="memberid"/>

<property name="time1" column="time1"/>

<property name="time2" column="time2"/>

<property name="ip" column="ip"/>

</class>
</hibernate-mapping>

_________________
Hus-Mukh
Java-J2EE Developer


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 30, 2008 5:27 am 
Regular
Regular

Joined: Mon Aug 06, 2007 10:49 am
Posts: 67
Location: Banska Bystrica, Slovakia
id for class is missing

http://www.hibernate.org/hib_docs/v3/re ... aration-id


Top
 Profile  
 
 Post subject: Wat is wrong with this mapping file
PostPosted: Wed Apr 30, 2008 6:49 am 
Newbie

Joined: Tue Apr 29, 2008 7:09 am
Posts: 5
Location: Karachi
Thanx Ferozz for your quick response.

I had one more question if i dnt have primary key for that table than wat is the solution for this kind of problem.
I read from link you provide ..in that it is necessary for a class it must have primary identifier.
so can u tell me if i dnt have primary identifier for that class.

_________________
Hus-Mukh
Java-J2EE Developer


Top
 Profile  
 
 Post subject: What is wrong with this Mapping file
PostPosted: Wed Apr 30, 2008 6:54 am 
Newbie

Joined: Tue Apr 29, 2008 7:09 am
Posts: 5
Location: Karachi
Thanks Ferozz for your quick response.

I had one more question
If i dnt have any primary key ...primary identifier for that class than wat is the solution to skip this chek.

Is their any mechanism to avoid id identifier.

_________________
Hus-Mukh
Java-J2EE Developer


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 30, 2008 8:26 am 
Regular
Regular

Joined: Mon Aug 06, 2007 10:49 am
Posts: 67
Location: Banska Bystrica, Slovakia
u should always have primary key in table, because it can caused a lot of problem for you later.

eventually u can claim one of your property which has always unique value as id, but table without primary key is pretty stupid idea


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.