-->
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: Problem with composite keys
PostPosted: Tue Jan 30, 2007 1:40 am 
Newbie

Joined: Mon Sep 18, 2006 9:55 am
Posts: 1
Hi,
I am facing some problems in doing programing with the table having more than one primary key. Can anybody suggest me how to do programs with composite keys? Can anybody send me the example code for composite keys.

Thanks
Karimulla


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 30, 2007 9:58 am 
Newbie

Joined: Tue Jan 30, 2007 8:43 am
Posts: 5
Location: India
<?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 Mar 7, 2006 4:21:37 PM by Hibernate Tools 3.1.0 beta1JBIDERC2 -->
<hibernate-mapping><class name="FactConfigurations" table="RULE_CFG_PROP_MAP">

<composite-id>
<key-property name="configId" column="rule_cfg_group_id" length="50"/>
<key-property name="propId" column="rule_entity_cls_prop_id" length="9"/>
</composite-id>

<property name="createdDateTime" type="date">
<column name="CREATED_DATE_TIME" not-null="true" />
</property>
</class>
</hibernate-mapping>

example for ur hbm file
could u be more clear whatz ur prob like


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.