OK, well, it looks like I'm out of luck here.
Can I ask: has anyone out there _successfully_ created a WO4/EOF3 app that:
-- has multiple eomodels
-- where each eomodel is for a different database
-- where entities in one eomodel have relationships to entities in another
model
-- where those entities are instantiated and their relationships
manipulated programmatically in the app (ie, not just fetched from the db)
-- and then succesfully inserted those back into the database(s)?
I received a report of one other site suffering from this problem (using
Obj-C not Java in this case), and a couple of sensible but unsuccessful
suggestions that didn't fix the problem.
Best wishes
Garrick
** -----Original Message-----
** From: McFarlane, Garrick [mailto:[EMAIL PROTECTED]]
** Sent: Wednesday, February 24, 1999 3:33 PM
** To: Multiple recipients of list
** Subject: BUG? recordToManySnapshots with multiple eomodels/databases
**
**
** Sorry for the cross-post. I posted this to the EOF list a
** few days ago but
** it seems that the WOF list is where all the action is these days.
**
** I believe this is a bug in the current release of WO4/EOF.
** I'd be most
** grateful if anyone can suggest a workaround. The problem
** appears to centre
** around a project having multiple eomodels which connect to different
** databases, and objects in those eomodels having
** relationships across models
** to each other.
**
** And please don't let the company standard email disclaimer
** at the end put
** you off replying!
**
** Thanks -- original message follows:
** -------------------------------------------------------------
** ------------
**
** Hello
**
** Well I'm opening myself up to a fresh torrent of spam in the
** hope that
** someone here can help me. I'd like to know if I'm doing
** something wrong here
** or am hitting a (dare I suggest it) bug in EOF3.0. The smart
** money's on me
** doing something wrong. I'd be grateful at least if anyone else who's
** encountered anything like this could give me some clues, a 'me too',
** workaround, anything...
**
** Garrick McFarlane, OO Type
** Linklaters and Paines
** London, England
** Tel: +44 171 456 5765
** ----
**
** Environment:
** EOF3.0; Java; WOF4.0; NT4SP3; Sybase
**
** Possible factors:
** multi-eomodel project/app, including cross-model,
** cross-database relationships.
**
** Error encountered:
** "recordToManySnapshots:: cannot record objects in a
** context when no
** transaction is in progress"
**
** Scenario:
** I'm instantiating a couple of eocustomobject
** subclasses, inserting
** them into an editingcontext, relating them to some
** preexisting fetched
** eocustomobject subclasses in another model/database, and
** then saving the
** editing context. All objects (in all models) are in the same editing
** context. EOF is successfully preparing the objects, fetching
** primary keys,
** generating the correct 'INSERT INTO' SQL, submitting it to
** Sybase, but then
** just when everything appears to have completed, the whole
** lot gets rolled
** back with the EOF error message above.
**
** If I remove the 'addObjectToBothSidesOfRelationship' calls
** which relate the
** new instances to objects in other models/databases, the
** editingcontext.save() succeeds. But, of course, I need my
** objects to be
** related across the models...
<etc>
____________________________________________________________
This message is confidential. It may also be privileged or
otherwise protected by work product immunity or other legal
rules. If you have received it by mistake please let us know
by reply and then delete it from your system; you should not
copy the message or disclose its contents to anyone.
____________________________________________________________