-->
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: Problems with persistence of joined-subclass table
PostPosted: Thu Nov 11, 2004 9:31 am 
Newbie

Joined: Wed Nov 10, 2004 2:20 pm
Posts: 2
Hibernate version:
2
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping package="com.socManager.scm.model.data.dbms">
<class name="Artifacttype" table="artifacttype" dynamic-insert="false">
<id
column="artifacttype_id"
name="Id"
type="java.lang.Long"
>
<generator class="vm" />
</id>
<property
column="artifacttype_name"
length="100"
name="ArtifacttypeName"
not-null="true"
type="string"
/>
<property
column="artifacttype_description"
name="ArtifacttypeDescription"
not-null="false"
type="string"
/>

<joined-subclass name="Projectartifacttype"
table="projectartifacttype">
<key column="artifacttype_id" />
<property
column="project_alias"
length="40"
name="ProjectAlias"
not-null="true"
type="string"
/>
</joined-subclass>
</class>
</hibernate-mapping>


Name and version of the database you are using:
Postgre 7.3

Hi!

I'm facing a problem when I try to save the joined subclass Projectartifacttype.
The Projectartifacttype VO extends the Artifacttype VO. To save the Projectartifacttype, I have to set the Artifacttype properties (id, name and description) with values of an existent Artifacttype row.
After that, I call the save method to the Projectartifacttype VO. this method inserts a new row in the Projectartifacttype table and in the Artifacttype table.
The problem is that I only want to insert a new row on the Projectartifacttype table and not on the Artifacttype.

What do I have to do to avoid the automatic insert on the Artifacttype table?

Thanks for the help!
Cunha


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.