Hello everybody,
I except not to be the first one to ask this question, but haven't found
anything in the archives.
My question is about synchronization resp. caching of 1:n relations. Let's say,
we have two entities:
class Event {
int id;
int eventTypeId;
EventType eventType;
// ... other fields
}
class EventType {
int id;
Collection<Event> events;
// ... other fields
}
So, there is a 1:n relationship between EventType and Event - EventType is on
the 1-side and Event is on the n-side.
Let's look at the following:
(1) We fetch an EventType (called evType) from DB incl. all the associated
Events.
(2) Another user deletes an Event from the DB which was associated with the
previously fetched EventType.
(3) At this point, an Event is included in the evType's events-collection which
doesn't exist any more cause it was deleted in (2).
Is there any caching or synchronization mechanism to avoid the problem in (3)?
Regards,
Abid
--
Abid Hussain
Mail: [EMAIL PROTECTED]
Web: http://www.abid76.de
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]