> -----Original Message-----
> From: Alex Paransky [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 4:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: versioning on top of entity beans
> 
> 
> You forgot the ONE most IMPORTANT issue:  d) Relationships.  Your bean
> (data) does not live in isolation.  What to do when thereis a 
> relationships
> between A and B, and B moves to a new version?  Do you create 
> a new version
> of A called A' and map it to a new version of B, called B'?  
> What if there
> are other relationships to A, what to do with those?

Well, it would probably necessitate your relationships being bi-directional, so you 
could get the objects referencing the current object easily. It really depends what 
your requirements are as to whether you need to version the entire object graph or 
just create a new version of the one that's changed and tell all of the relationship 
objects to point to the head revision (to steal from Perforce's CM vocabulary). This 
is probably sufficient in this case.

> 
> As someone else suggested, using version in a PK is 
> interesting, but what a
> mess for relationships.
> 

Not really. You need to update relationships anyway. You can't have two different 
entities with the same PK, so something has to change. If you use the version ID as 
part of the PK and use FK relationships, then you can see the relationships in an old 
version and old versions maintain relationships with the versions that were there when 
they were the head revision. Again, this would be true no matter what, but you can see 
it more clearly with the version as part of the PK.


> -AP_
> 

Jason Carreira 

==========================================================================To 
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to