On Sep 19, 2008, at 5:05 PM, Aristedes Maniatis wrote:
> I can't find one just now, but yes. We definitely have this problem.
> And we do exactly the same thing with a deleted flag. I don't know
> if this has anything to do with relations though. Can the bug be
> triggered by simply having a list of objects and marking one as
> deleted without removing it from the context?
Probably not. The object will stay in committed state in the context,
and will behave just like a regular data object. So using
relationships or other turning an object into fault is how you'd
trigger that.
> The bug itself needs to be fixed, but I've also been thinking for a
> while that it would be nice for Cayenne modeler to have an option to
> support this type of delete. Really it would just be a simple way to
> choose "[ ] Don't permanently delete records." and the appropriate
> lifecycle hook, field, and qualifier are all added.
>
> It is a pretty common sort of use case.
Yeah, seems like a useful function to generate default mapping. Still
need to make it clear to the users that they can pick any column for
the delete flag, and can use any value... Also I thought the callback
should be implicit, added in runtime. There's no reason for the users
to see/change it in the mapping.
Andrus
This archive was generated by hypermail 2.0.0 : Fri Sep 19 2008 - 10:18:05 EDT