On Apr 8, 2006, at 1:43 AM, Bryan Lewis wrote:
> We occasionally get referential integrity errors from some old legacy
> data in our database. In our old WebObjects days such errors were
> basically ignored. When we converted to Cayenne, I duplicated the old
> behavior by overriding resolveFault() in our DataObject superclass.
>
> Now that method has moved to DataContext.prepareForAccess() which
> isn't
> as easy to override, so I thought this is a good time to ask... what's
> the preferred way to catch these errors in a less drastic way than
> throwing a runtime exception? Thanks.
Hi Bryan,
Here is a fairly easy way to subclass DataContext - in the Modeler
you can set a user defined DataContextFactory for a DataDomain.
In the future catching bad faults maybe a good candidate for
including in the context delegate interface.
Andrus
This archive was generated by hypermail 2.0.0 : Sat Apr 08 2006 - 04:54:49 EDT