
Originally Posted by
kyberfabrikken
I don't see the problem either, but I may be missing something obvious ?
For optimistic locking no - I don't require one unique id, but take pessimistic - I might got a locking table that looks like this:
Code:
[ Owner ] [ Locktype ] [ Table] [ Key ]
sessid1 ex. write Person 1
Now If i wanted to lock a table with more then one key field where would I put the key? Yes I know it's possible to use my hashed key for the object (which I use in my identity map) - but that requires many queries (ie first retriving all locks for the table you're querying, then retrieve all rows you want, then compare locks <> rows and see if any locks match any of the hashed primary key values for your rows)
Hmm, ok - It doesn't sound so bad when I write it out that way tbh... maybee I was a bit tired last night ;p ah well I'll have another go at it today.
Bookmarks