I've just committed more code to handle deletion of many to many associations and also to handle changes to key values in those associations.
So far it seems to be working well.
Things I haven't quite sorted out:
1. How to cleanly handle removing an item from a collection
2. Mapping the association using custom attributes (ie in code)
3. Making it work for interfaces and standalone objects (ie ones that don't inherit from CPersistentObject)
If anyone want's to have a go at one of these things please feel free (just let me know first).
- Richard.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found a few more problems with the many-to-many associations and also with the cache behaviour recently.
The main problem with the cache was to do with the recent fix for the state of collections before and after transactions. Events of copied collections were still wired to the original container object not the copied container object. It was a bit head scratchy but I'm pretty sure it works now.
I also found a few problems with many-to-many state management.
Anyway, the changes are in CVS now. Let me know if you find a problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just committed more code to handle deletion of many to many associations and also to handle changes to key values in those associations.
So far it seems to be working well.
Things I haven't quite sorted out:
1. How to cleanly handle removing an item from a collection
2. Mapping the association using custom attributes (ie in code)
3. Making it work for interfaces and standalone objects (ie ones that don't inherit from CPersistentObject)
If anyone want's to have a go at one of these things please feel free (just let me know first).
- Richard.
Removing an item from the collection without actually deleting the item off the database now works.
Items 2 and 3 I'll tackle sometime next week unless someone else does it first :-)
I found a few more problems with the many-to-many associations and also with the cache behaviour recently.
The main problem with the cache was to do with the recent fix for the state of collections before and after transactions. Events of copied collections were still wired to the original container object not the copied container object. It was a bit head scratchy but I'm pretty sure it works now.
I also found a few problems with many-to-many state management.
Anyway, the changes are in CVS now. Let me know if you find a problem.