Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-31 Thread Luis Camargo
> > Hi, > > I'm having exactly the same problem. Modified the source to read: > > List descriptors = connectionRepository().getAllDescriptor(); > org.apache.ojb.broker.metadata.JdbcConnectionDescriptor descriptor; > for (Iterator iterator = descriptors.iterator(); iterator.hasNex

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-31 Thread Luis Camargo
> > Mark > > Armin Waibel apache.org> wrote: > Mark Spritzler wrote: > > > No there is only one jar file which is wrapped into the .war file that is deployed. > > > > Mark to verify my assumption, can you change line 558 in MetadataManager > to force a log message, e.g. > > Object temp = i

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-17 Thread Armin Waibel
posite VOs when you have 1-1 parent-child relationships. any thoughts? (someone please tell me that I am wrong, and that there is a better way to do this) -Original Message- From: Mark Spritzler [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 4:21 PM To: OJB Users List Subject: RE: Ch

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-17 Thread Martin I. Levi
t; > company obj mapping (parent) > > contains > > primary manager obj (only one reference and this is truly a child of > > company) > > primary address obj (same deal) > > > > but this would fail because OJB will try to insert the manager and address > > first &g

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-17 Thread Martin I. Levi
Hi As a hint to improve documentation: When reading the 1:1 auto-xxx settings (http://db.apache.org/ojb/tutorial3.html) i found that there's no place explaining where exactly in the repository_user.xml these settings should be specified (I suppose this place is the reference descriptor, am i righ

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-11 Thread Mark Spritzler
Huh? I have the OJB jar with all the .class files. I have no source. OK, I tried to download the source, got it, unzipped it, opened it in IntellJ IDEA, then ran the All target in the Ant build.xml. I get the following error build.xml:194 j2ee.jar file is missing. I am taking my ejb_2_0.jar

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-11 Thread Armin Waibel
Mark Spritzler wrote: No there is only one jar file which is wrapped into the .war file that is deployed. Mark to verify my assumption, can you change line 558 in MetadataManager to force a log message, e.g. Object temp = iterator.next(); log.error("## Test: " + temp.getClass); descriptor = (Jd

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-10 Thread Mark Spritzler
No there is only one jar file which is wrapped into the .war file that is deployed. Mark Armin Waibel <[EMAIL PROTECTED]> wrote: Hi Mark, > java.lang.ClassCastException at > org.apache.ojb.broker.metadata.MetadataManager.buildDefaultKey( > MetadataManager.java:558) at > org.apache.ojb.broker.me

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-10 Thread Armin Waibel
Hi Mark, > java.lang.ClassCastException at > org.apache.ojb.broker.metadata.MetadataManager.buildDefaultKey( > MetadataManager.java:558) at > org.apache.ojb.broker.metadata.MetadataManager.init( > MetadataManager.java:164) at Here is the source code: private PBKey buildDefaultKey() { Lis

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-10 Thread Stefan Schlösser
Mark Spritzler wrote: root cause java.lang.ExceptionInInitializerError at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.getDefaultKey(PersistenceBrokerFactoryBaseImpl.java:75) at org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(PersistenceBrokerFac

RE: Child Table insert at same time as Parent and Auto generated PK

2004-05-08 Thread Mark Spritzler
Now I seem to have a problem retrieving the data. It saves but now it won't retrieve. It is kind of like in retrieving, it is going the other way, and since the parent doesn't have info about the child in a reference descriptor tag, it is giving me an error. Actually I am making an assumption h

Re: Child Table insert at same time as Parent and Auto generated PK

2004-05-07 Thread Armin Waibel
really makes it hard for you to use composite VOs when you have 1-1 parent-child relationships. any thoughts? (someone please tell me that I am wrong, and that there is a better way to do this) -Original Message- From: Mark Spritzler [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2

RE: Child Table insert at same time as Parent and Auto generated PK

2004-05-07 Thread McCaffrey, John G.
[mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 5:00 PM To: OJB Users List Subject: RE: Child Table insert at same time as Parent and Auto generated PK Yes, I think it is backwards myself. I made the change and the Parent record got inserted. This is my first inserted record so far using OJB

RE: Child Table insert at same time as Parent and Auto generated PK

2004-05-07 Thread Mark Spritzler
you to use composite VOs when you have 1-1 parent-child relationships. any thoughts? (someone please tell me that I am wrong, and that there is a better way to do this) -Original Message- From: Mark Spritzler [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 4:21 PM To: OJB Users Lis

RE: Child Table insert at same time as Parent and Auto generated PK

2004-05-07 Thread McCaffrey, John G.
Mark Spritzler [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 4:21 PM To: OJB Users List Subject: RE: Child Table insert at same time as Parent and Auto generated PK Hi John, thanks. Actually I have already added the sequence manager to the jdbc-connection-descriptor, and also the settings fo

RE: Child Table insert at same time as Parent and Auto generated PK

2004-05-07 Thread Mark Spritzler
Hi John, thanks. Actually I have already added the sequence manager to the jdbc-connection-descriptor, and also the settings for the primary key. So are you saying that my reference-descriptor in the Parent table needs to be removed and instead add it to my child table? If not then, what do you

RE: Child Table insert at same time as Parent and Auto generated PK

2004-05-07 Thread McCaffrey, John G.
Search the archives for SequenceManger and Idenity threads. Here is what I needed to do: add a sequence manager to my jdbc-connection-descriptor Make sure these were set on my primary key primarykey="true" autoincrement="true" access="readonly" Then I had to flip my mapping