Hello Develoopers,

I have only one question about this. Why are the fields object.owner and insrel.dir persistent and not system?

I am trying to make a distinction in my code which fields can be written by a user and which ones not. I didn't have problems in previous releases of mmbase, because I excluded all the object and insrel fields, but now with the new datatype features this is not enough.

org.mmbase.bridge.BridgeException: You cannot change the field lastmodifier
        at
org.mmbase.datatypes.processors.LastModifier.process(LastModifier.java:35)
        at
org.mmbase.datatypes.BasicDataType.process(BasicDataType.java:476)
        at
org.mmbase.bridge.implementation.BasicNode.setStringValue(BasicNode.java:519)

I thought to do it by checking if the field is system managed, but then the above mentioned fields are an exception on that rule.
Can I just change these field definitions to state="system"?

Nico

Ps it might be nice to have methods in the bridge like
        boolean isSystem();
        boolean isVirtual();
        boolean isPersistent();
        boolean isStored(); (isSystem() || isPersistent())
instead of checking the getState() == STATE_*
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to