Rickard Öberg-3 wrote:
> 
> I have used two patterns to deal with this. The first is, as Niclas 
> said, to explicitly handle associations properly. The second is to make 
> a query to find associations, and remove them that way. Both are 
> explicit, but in the second case I make use of the indexing to easily 
> find out what needs to be changed.
> 

As for the first approach, when you say 'explicitly handle associations
properly', is there more to it than annotating associations with @Aggregated
(as Niclas pointed out)? BTW: The code I posted used an Association<B\>, but
the mailing list's web frontend took this as formatting.

For the second approach, is there some code (tests) in Qi4j's code base that
demonstrates how to query for associations? The only way I can think of now
is registering the referenced element together with the referencing element
and the relevant Association in an update handler which then updates removed
element when unit a unit of work completes.

Cheers,
Frank
-- 
View this message in context: 
http://old.nabble.com/SideEffects-for-Properties-tp31811808p31841482.html
Sent from the Qi4j-dev mailing list archive at Nabble.com.


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to