Re: EOF inserts PK automatically
Re: EOF inserts PK automatically
- Subject: Re: EOF inserts PK automatically
- From: "Ruenagel, Frank" <email@hidden>
- Date: Mon, 22 Nov 2004 12:44:34 +0100
Hi Anjo,
hmm. I guess you misunderstood me. If you use the way I have
shortly described every insert via saveChanges() is forbidden.
EOF only may do updates. All inserts (from the WO Application)
*must* use the stored procedure. The standard insert of EOF may
never occur.
Also there is no use of EO_PK_Table. And again, to remember
the context: We are talking about a way to use MS-SQL-identity-columns
with WO.
Again:
1. A user wants to insert an new record
2. A stored procedure creates an empty record with default values
3. The stored procedure returns the pk of the newly created record to WO.
4. WO fetches the record with EOUtilities.objectWithPrimaryKeyValue
5. WO presents this "empty" record to the user
6. The user makes his changes and the EO is saved with ec.saveChanges()
There is no insert via EOF. Only a fetch. With
EOUtilities.objectWithPrimaryKeyValue.
Perhaps i'am wrong, but IMHO I do not see a fundamental problem here.
Of course: if the user cancels the insert there is a record with
default values. This is a disadvantage.
Best regards
Frank
> -----Original Message-----
> From: Anjo Krank [mailto:email@hidden]
> Sent: Monday, November 22, 2004 12:21 PM
> To: Ruenagel, Frank
> Cc: 'email@hidden'
> Subject: Re: EOF inserts PK automatically
>
>
>
> Am 22.11.2004 um 11:55 schrieb Ruenagel, Frank:
>
> > Transaction Problem:
> > There is no insert outside the stored procedure. So why should
> > there rise a problem?
>
> I *may* be wrong here (although I doubt it), but: EOF gets a PK (and
> inserts dummy record) is one transaction, EOF inserts object is
> another. So it might be that you are left with a half-inserted object
> and dummy data because insertion (EOF) failed for one reason or
> another...
>
> Cheers, Anjo
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden