> > the existance of a jcr:primaryType property state is not part of the > > consistency of a persistence manager. this would be redundant, > > since the nodetypename is also stored in the respective node state. > > IMO, the jcr:primaryType property should be dynamically generated out > > of the information in the node state and not to be stored seperately > > in the persistence manager as property state. > > I have no preference, I'd like to store the primary type either as any > other property or as a special property. The problem is that in most > cases the primary type is passed to the PM as a PropertyState and in at > least one case it's not. Is there any reason for not chosing a single > criteria? in this case, that persistence manager is used by the persistence layer of versioning, which has a seperate way of how to manage the item states. for this purpose, that property is not needed. however, from the persistencemanager perspective, the property state jcr:primaryType is just a normal property state with no special sematics (just like jcr:mixinTypes, jcr:uuid). the persistence manager must not validate or rely on those (actually on any) property states. the nodetype (or uuid) information, stored within the nodestate is crucial for the rest of the system.
> With the current behaviour If I store it as a special property I should > also add an if statement that ignores the PropertyState if it's a > primary type. Is it the right way? well, that would be very lowlevel persistencemanager tuning, and relies on higherlevel functionality. of course you can ommit the storage of this state, but you must recreate it on a load. but this could cause problems later, if ever the storage of jcr:primaryType is optimized on a higher level. i suggest to keep the persistence managers as passive as possible, with a little intelligence as possible. cheers, tobi -- ------------------------------------------< [EMAIL PROTECTED] >--- Tobias Strasser, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel T +41 61 226 98 98, F +41 61 226 98 97 -----------------------------------------------< http://www.day.com >---
