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: composite id object insert nhibernate
PostPosted: Mon Aug 21, 2006 8:56 am 
Newbie

Joined: Mon Aug 21, 2006 8:33 am
Posts: 3
I have a problem to insert a composite-id object into Mysql database
The problem is that before inserting a new object into database I should verify if the object already exist or no
I tried to use Isession.get() but I don't know which identifier should I enter
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" auto-import="true" >
<class name="FlatInfo.DataCollector.Service,FlatInfo.DataCollector" table="Service" lazy="true" mutable="true">
   <composite-id>
      <key-property name="ServiceName" type="System.String"/>
      <key-property name="Version" type="System.String"/>             
   </composite-id>
   
</class>
</hibernate-mapping>

or should i change the mapping file and manage to have an auto generated id

Please is there any one to help it is urgent!!!!!
Execuse me if I sent the topic many times I m new menber in the forum
[/quote]


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.