This may well be a stupid question, but here goes...
How are many-to-many -relationships supposed work with long transactions?
For example, I have an object representing a project and an object
representing a person:
- a project can have n responsible persons.
- a person can have n project to be responsible of.
I load a project, do db.commit(), add a responsible person and do
db.update(project) and db.commit().
If I do nothin more, responsible persons will be transient and not saved to
the database. If I update also each responsible person, they loose their
relationships with other projects. If I query the persons to get them into
same transaction, also current project's other responsible persons come
along with the very same project attached to them causing
DuplicateIdentityException.
So this looks like the egg and chicken -kind of problem. How should I do
this?
- Jukka
---------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<contact>
<title> Portal Architect </title>
<name> Jukka Koivusalo </name>
<email> [EMAIL PROTECTED] </email>
<telephone> +358 44 044 2123 </telephone>
<address>
<street> Kaisaniemenkatu 4 A, 3rd floor </street>
<mail> P.O.Box 1319, FIN-00101 Helsinki </mail>
</address>
</contact>
---------------------------------------------------------
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev