I have a class which has a foreign key that I need to define an association for.
However, this class can be distributed across multiple sites (different, remote databases) where the foreign class may not exist.
I can remove the foreign key constraint in the database and I can use the @NotFound(IGNORE) annotation to stop exceptions when the foreign class does not exist, but the schema update always wants to recreate the FK when I have it set to 'update'.
Is there any way to selectively stop the schema update from creating a foreign key constraint?
It would be really nice if the schema update 'saw' the NotFound annotation and used it's presence as an indicator not to create the FK constraint.
By the way, I will listen to any comments about bad design, but I doubt there is any other way to distribute objects to remote databases without their associated foreign classes. Surprise me.
Cheers, Duncan.
|