Just checked in this patch with corrections (see below).
On Thursday, September 25, 2003, at 04:43 PM, Mike Kienenberger wrote:
>
> Adding the following code after line 420 would seem to accomplish the
> same purpose if I follow what's going on (assumption: the object is
> marked COMMITED if no potential database changes were detected).
>
> Class anObjEntityClass =
> o.getObjectId().getObjClass();
> ObjEntity anObjEntity =
> context.getEntityResolver().lookupObjEntity(anObjEntityClass);
> if (anObjEntity.isReadOnly()) {
> if (PersistenceState.MODIFIED ==
> o.getPersistenceState())
> throw
> attemptToCommitReadOnlyEntity(anObjEntityClass, anObjEntity);
> }
It was more than that - handling of read only entities was also
required for delete and insert....
> As near as I can tell classifyAsWritable() doesn't do anything
> meaningful other than generate the exception. writableObjEntities is
> not used anywhere.
Well, it was used - for tracking the entities that have been processed
already. Now since I got rid of classifyAsWritable(),
writableObjEntities is removed too.
Andrus
This archive was generated by hypermail 2.0.0 : Thu Sep 25 2003 - 21:41:37 EDT