Resending, copying the persistence alias.
-- markus.
attached mail follows:
Hi Tom,
1) I'm trying to add validation addressing updates to non-updateable
fields and similar issues. Attached is a fragment for that. Could you
please give me your opinion?
I've changed DeferredChangeDetectionPolicy to call
mapping.calculateValidatedChange instead of mapping.compareForChange
directly. DatabaseMapping.calculateValidatedChange would call
compareForChange to prepare the ChangeRecord for the field, and than do
some validation, if the ChangeRecord is not null (= the field has been
set or updated).
2) When running entity-persistence-tests, I get a couple of failures
after this modification. This is because the the PhoneNumber.Id field is
annotated as insertable="false", updatable="false". IMO, the "Owner"
relationship should rather be annotated that way, and not one of the
primary key fields. The PhoneNumber class is used in several packages,
an example can be found under
entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/advanced/PhoneNumber.java
What do you think?
Thanks very much!
-- markus.