I have an application that uses CMP. The database is used by different programming languages (e.g. Delphi).
My concrete problem is that in a many to one relation it is possible to have invalid foreign keys. The linked row has been deleted by another application, but can be handled by the application.
As I am accessing the entity linked in the relation I always get a TransactionRolledbackException, I couldn't manage to catch this exception in my Session bean that should handle these things.
Is it possible to check whether a relation is valid or not?
So you database is in an invalid state? I don't deal with invalid databases states. Maybe in a future version I could think about this, but it seems like a lot of work for not a lot of pay off.