Hi Julian,
so far I haven't seen a proposal how the desired semantics (query operating on the transient state) can be implemented efficiently at all,
As far as I know, old Hibernate and JPA works like this (except objects that are not persisted, and detached objects; both cases are not relevant for JCR). So it can be implemented. I would even say if somebody wants to implement JCR using an JPA, it would be easier that way.
... without closely coupling the transient space implementation to the storage.
Is there a rule in the spec that says the transient space must be decoupled (except, the rule we are talking about)?
I just don't see how to implement that.
It goes like this: there is a hash set of changed nodes (when the app calls setProperty the JCR implementation adds the node to this set). When the application runs a query, the engine would store the changed nodes but don't commit (that is, when using a database backend and the same engine for querying). That's it.
For the record, I'm fine with *allowing* repositories to implement that (but not making it required).
I fully agree. For some implementations it is easy, for some very hard. Thomas
