-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate .hbn.xml
PostPosted: Mon Sep 22, 2008 8:58 am 
Newbie

Joined: Wed Jul 23, 2008 2:50 am
Posts: 16
Hi!

is it possible to dont use any id-generating in my hbn.xml file.
I have two column that none of them is id, and i don't need to have a colum with auto-increment.
How can i write my hbn.xml
for example if i have a timestamp and status coulmns on my table.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

<class name="Statstic" table="statitic">
<property name="timestamp"/>
<property name="status"/>

</class>

</hibernate-mapping>

How should this file look like?
thanks in advanced


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 22, 2008 9:18 am 
Newbie

Joined: Wed Jul 23, 2008 2:50 am
Posts: 16
i find the answer, i can just put <id> </id> anything else is optional, and it can be just put an empty <id> on hbn.xml

:)


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