-->
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: Deleting a child
PostPosted: Mon Jun 07, 2004 4:27 pm 
Regular
Regular

Joined: Sat May 29, 2004 2:16 pm
Posts: 81
I'm using hibernate 2.1, MySql 2.0.12-nt, j2sdk1.4.2_04
My app has a class - Relatorio - that is composed of two classes: Turma and Disciplina.
Turma has a child - Detalhe.
Here are my mapping docs:
Relatorio:

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

<hibernate-mapping>
<class name = "relatorio.Relatorio" table = "relatorios">
<id name = "id" column = "id" unsaved-value = "null">
<generator class = "increment" />
</id>
    <many-to-one name = "turma" column = "rel_turmas" class = "relatorio.Turma"
        cascade="all">
    </many-to-one>
    <many-to-one name = "mat" column = "rel_mat" class = "relatorio.Disciplina"
        cascade="all">
    </many-to-one>
    <many-to-one name = "pt" column = "rel_pt" class = "relatorio.Disciplina"
        cascade="all">
    </many-to-one>
        <many-to-one name = "cn" column = "rel_cn" class = "relatorio.Disciplina"
        cascade="all">
    </many-to-one>
  </class>
</hibernate-mapping>


Turma:
[code]<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name = "relatorio.Turma" table = "turmas">
<id name = "id" column = "id" unsaved-value = "null">
<generator class = "increment" />
</id>
<property name = "turma" column = "turma" />
<property name = "ano" column = "ano" />
<property name = "masculinos" column = "masculinos" />
<property name = "femininos" column = "femininos" />
<!-- retirei lazy = true para poder fechar a sess


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 08, 2004 1:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use your debugger to resolve this.


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.