> -----Original Message----- > From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 11, 2002 4:43 PM > To: [EMAIL PROTECTED] > Subject: Re: versioning on top of entity beans > > > In my case, A owns B, and controls all access to B. So A is > versioned, there may be duplicate copies of Bs around, for different > versions of A, and then I pick a point to create a new > version of A, and close off that version. > > so in A I have > a-pk > version > foo > bar > > and in B > b-pk > a-fk > abc > def
So if a-pk and b-pk are UUIDs and you create new ones for each new version, how do you relate one version to another? How do you tell that a-pk1 and a-pk2 are different versions of the same item? If you had a-pk and version as the compound PK then you can easily tell that if a-pk is the same for two entities, that they are different versions of the same entity. You could have this instead: In A uuid a-id version foo bar where uuid is the PK, and you have a unique index on (a-id, version) so you can use a-id as the common thread between versions. > > and a method in A > > A newVersion(); > > which returns a deep copy of A, but wth a new version. My > slsb, which controls all access to A, ensures that new versions are > created as required, and not modified. > > how is it sounding? > Good so far, if you can guarantee that all access to the entities goes through the SLSB. Do you version control B? It looks like no.... > cheesr > dim > > ==========================================================================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".
