What type of problem are you having? If you're using OTM, ODMG, or JDO, you
need to set auto-update to false.
 
Eric

-----Original Message-----
From: Timofey Korolev [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 30, 2003 8:38 AM
To: OJB Users List
Subject: RE: 1:n mapping


On Mon, 2003-06-30 at 16:17, Jim Shingler wrote: 

Hope this helps,  I am assuming that the problem is the Repository.xml

file


Thank you Jim, i appreciate your help, but this is not what i need. I'll try
to be more specific.


I got two classes:


class General {
private Collection particles;
private int id;
private String title;
}

and

class Particle {
private int particalId;
private String name;
private int generalId;
private General generalObject;
}

I'm trying to do following mapping
<class-descriptor class="General" table="GENERAL"  >
  <field-descriptor name="id" column="id" sequence-name="general_id_seq"
jdbc-type="NUMERIC" autoincrement="true" primarykey="true" />
  <field-descriptor name="title" column="title" jdbc-type="VARCHAR"/>
  <collection-descriptor name="particles"  element-class-ref="Particle"
orderby="particleId" sort="DESC" >
       <inverse-foreignkey field-ref="generalId"/>
  </collection-descriptor>
</class-descriptor>

<class-descriptor class="Particle" table="PARTICLE">
  <field-descriptor name="particleId" column="id" jdbc-type="NUMERIC"
autoincrement="true" primarykey="true" sequence-name="particle_id_seq" />
<field-descriptor name="name" column="name" jdbc-type="VARCHAR"/>
<field-descriptor name="generalId" column="gid"  jdbc-type="NUMERIC"/>
  <reference-descriptor name="generalObject" class-ref="General"
auto-retrieve="true" auto-update="true" auto-delete="true">
       <foreignkey field-ref="generalId"/>
  </reference-descriptor>
</class-descriptor>


I've made this mapping looking on the Advanced O/R Tutorial om OJB's site.
And this thing doesn't work. I am at a loss. I want to use it in my phd
work, but this problem makes me sick.
I think that ojb can save a lot of my coding time...









-- 

Regards,

CEO Linux-Online.Ru

Korolyov Timofey



www.linuxshop.ru :: www.prefnews.ru :: www.dotstyle.ru



JabberID: [EMAIL PROTECTED]






DISCLAIMER: The information contained in this e-mail is, unless otherwise
indicated, confidential and is intended solely for the use of the named
addressee. Access, copying or re-use of the e-mail or any information
contained therein by any other person is not authorized. If you are not the
intended recipient please notify us immediately by returning the e-mail to
the originator.

Reply via email to