On Wed, Jun 11, 2008 at 4:32 PM, Michael Hunger <[EMAIL PROTECTED]> wrote:
> @Assoc > Regarding the Associations. Do I as the EntityStore have the obligation to > check for the existence of the referrered > Entities and keep them up to date or fail if they don't exist (or even create > them on demand) ? > > And what about containment by value (cascading delete) vs. containment by > reference? Are normal EntityComposite > properties for the former and all assoc for the latter? By now I implemented > EntityComposite propertys as embedded > columns of the Entity. Ibatis does not really well support multiple > statements within one xml-statement declaration. So > there would have to be separate crud statements for each referred to entity. It has been said that EntityStores are responsible for as little as possible, to make them easy to implement. With that principle, I expect that "cascaded deletes" are not part of the scope. Everything is "small bits".... Checking for existence is part of the responsibility of the EntityStore, but I think it is free to delay that until state is actually retrieved, which for "better impls" are expected to be the norm (i.e. lazy loading, hollow objects....) At UnitOfWork level you will notice that there is both a getReference() method as well as a find(), and these are related to these things. find() will make the existence check, whereas getReference() doesn't IIRC. Cheers Niclas _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

