db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kalén <mka...@apache.org>
Subject Re: [PB-API] Problem with assertValidPkForDelete and Long(0) as PK
Date Wed, 03 May 2006 09:27:07 GMT
Armin Waibel wrote:
> What about the FK fields? These fields have to reflect the same behavior 
> as the PK fields. Do you expect that the user defines the same 
> "null-check" attribute in all FK fields of the referenced objects? If 
> this is the case we should add some kind of "check" (check if the PK 
> field and FK field use the same NullCheck implementation, if not log an 
> error msg or throw an exception) when OJB collects the FK fields of a 
> reference the first time.

I'm currently trying to find a good place to implement this check,
but I could use some creative ideas or suggestions.

The PK NullCheck functionality itself is already in place, but the
question is how to implement the "consistency check" so that it
covers all different references in the mapping.

Eg what about a referece-descriptor where the FK of the referenced
class points to a non-PK field of the current class, must one
define the same null-check in both class-descriptors there and should
OJB do consistency checking? Currently I tend to think that's the case,
but haven't found a good way to implement the consistency checking.


To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message