Hi,
I have a fairly complex structure of several entities (actually this is not so complex after all). Eventually when I try to delete an ElectronicDocument (this is a pure ERD2W app, no custom delete() stuff) my application throws up with
java.lang.IllegalStateException: A valid global ID could not be obtained for entity named TextblockReference, relationship named textblocks, primary key dictionary {electronicDocumentID = 14; textblockID = 65; }.
I do not really understand what the problem is here but I think it might have something to do with delete rule specification in the model or the flattened relationship. What confuses me is that there are delete rules for both directions of a relationship which makes no sense to me. And what should those be for the flattened relationship?
Here is the model:
ElectronicDocument <-->>TextblockReference<<-->Textblock. TextblockReference is more than a simple m:n join table. However I have a flattened m:n relationship between ElectronicDocument (called textblocks) and Textblock (called documents) across TextblockReference. There are other entities hanging off TextblockReference: TextblockReferemce<-->>Params<-->>Data.
When I delete an ElectronicDocument I want all associated TextblocReferences and everything hanging off it be gone, however Textblock should stay around but not have that particular ElectronicDocument object in its flattened relationship anymore.
What would be the proper delete rules and why would I have to specify a delete rule for both directions (this is a general question)? It does not make sense to have a rule from the many to the one entity. Oh, and the DB is Oracle 9 and there are cascading FKs defined. I need those because there are some 3rd party apps messing with the data as well. Yes, ugly, but that's what the customer wants...
Thanks for any help ---markus---
|