Mapping Question

2004-01-01 Thread Patrick Scheuerer
Hi,

Please see the attached image of my data model for reference (I'm sorry for the 
attachment but it's kind of complicated to describe the scenario otherwise. A 
picture says more than a thousand words :-) ).

How do I map the relationship between pal_model - download and pal_model - document?
The corresponding value objects (DownloadVO and DocumentVO) both implement the 
Interface SupportItemI.
My PalModelVO has a collection which holds all the SupportItemIs for a PalModelVO.

How can I map a collection that gets it's data from two m-n relationships? Can I 
specify two indirection tables? Do i have to change my data model?

Any comments and suggestions are welcome.

I wish everybody a peaceful, prosperous and happy new year!
Patrick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Mapping Question

2004-01-01 Thread Patrick Scheuerer
ooops, I guess attachments are not allowed in this mailing list.

here's a link to the picture:
http://homepage.hispeed.ch/tabalooga/datamodel.jpg
the same problem of course also exists for the keyword table.

Thank you, Patrick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Strange error...

2004-01-01 Thread Gunnar Hilling
Hello,

Could please anyone help me in finding the reason for the following error:
It occurs when creating a bunch of new objects ...

[org.apache.ojb.broker.accesslayer.JdbcAccessImpl]
ERROR: SQLException during the execution of the insert (for a
org.apache.ojb.odmg.collections.DListEntry_2): ERROR:  ExecInsert: Fail to
add null value in not null attribute dlist_id

ERROR:
ExecInsert: Fail to add null value in not null attribute dlist_id


Regards,

-Gunnar



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Strange error...

2004-01-01 Thread Gunnar Hilling
Is it possible that the reason is a change in my datamodel: I added an
additional ojb collection, backed by a DList. My old objects in the db
don't have this dlist. I assume, ojb tries to load the dlist and
doesn't find it.
Am I right? How can I fix this??

Thanks a lot.

-Gunnar



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Strange error.../more info

2004-01-01 Thread Gunnar Hilling

I've developed a simple code snippet to reproduce the error:

Produkt prod=(Produkt)res.get(0);
Zertifikat zert=new Zertifikat();

TextData xml=new TextData(xml, tach);
TextData plain=new TextData(plain, tach);
db.makePersistent(xml);
db.makePersistent(plain);

zert.setXmlData(xml);
zert.setPlainData(plain);

prod.addZertifikat(zert);

tx.commit();

The only DList involved ist the List in Produkt which is changed by
prod.addZertifikat(zert);
This DList has always been in the db and the object model...

-Gunnar



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Rollback not working

2004-01-01 Thread Gunnar Hilling
When trying code i catch exception and do a tx.abort() when an error
occurs. But when the error is caused by an SQLException during tx.commit()
all changes done are written to the database...

this is a real problem for me. Shouldn't the db-commit be all or nothing
(rc5, postgres).

-Gunnar



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]