Niclas Hedhman wrote: > 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.
Agree. All type information is now encapsulated by EntityState.entityType(), so the ValueStates that are sent in to EntityState.setProperty() only has values (I had it include type in the first version but this has been removed). Schema migration should be possible now, although it is not easy. To make it easier I think we need to be able to calculate the *hash* of an EntityType, using property names and types, recursively for value types. Then it is fast to check if a previously stored Entity used an outdated EntityType, and one can then perform migration rules. Does that sound reasonable? If so I will start looking at how to calculate the hash. /Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

