On Wed, Feb 18, 2009 at 10:11 AM, Michael Hunger <[email protected]> wrote:
> Regarding the possibilities of values and their equality perhaps we can take > some > points from scala's case classes? Those embody the structure of their > creation and > this information is also used for equals etc (was this other thing > constructed the > same way as me). "constructed same way" == can re-use the same instance. Now, I am all for implementing this behind the scenes 'later' as an optimization, but for now I don't see a problem with equals() being defined as "all values are equal() and same Composite type". > Regarding the persistence of values. If the type information take too much > room we still can provide a custom serialization and have a lookup table for > type information which is stored within the serializing store as well (saved > on update) > and reloaded on startup. Well, I think this would introduce much more complexity into the EntityStores as well as requiring a SPI change. The current approach (AFAIUI) is that the EntityStore is handed a serializable value in the "properties list" of an entity. In reality, the actual ValueComposite types are replaced by ValueState instances, again to isolate leakage. Also, the schema migration hook (yet to be defined) should be managed by the UnitOfWork "layer" to ensure all EntityStores are capable. Cheers Niclas -- http://www.qi4j.org - New Energy for Java _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

