Follow the steps listed here as workaround when an extended property of boolean or integer data type is not updated when set to the default value.
If you try to set the value of an extended property of single-valued boolean or integer data type to its default value, the property does not get updated. For example, if you try to set the value of a single-valued integer data type to any value other than 0, which is the default value, the update is performed successfully. However, if you try to set it to its default value 0, the property value does not get updated. Similarly, if you try to set the value of an extended property of boolean data type to true, the update is performed successfully. However if you try to set the property to its default value of false, the value does not get updated.
This happens only when the extended property is defined as single-valued. This is an EMF limitation.
Complete the following steps to work around this problem.
For details, see Sample code for extending schema in the file repository, Sample code for extending the schema in the property extension repository, and Sample code for extending the schema in an LDAP repository.
You can also use the addIdMgrPropertyToEntityTypes wsadmin command to create a new extended property of boolean or integer data type with multi-valued set to true.
DataObject root = SDOHelper.createRootDataObject(); DataObject entity = SDOHelper.createEntityDataObject(root, null, SchemaConstants.DO_PERSON_ACCOUNT); // Set the properties of the person entity.set("uid", uid); entity.set("cn", cn); entity.set("sn", sn); // Create a new array list of size one List lst = new ArrayList(); lst.add(0); entity.set("jersyNumber", lst ); System.out.println("Input datagraph before creating user"+ printDO(root)); // Create the PersonAccount entity root = service.create(root); // Print the output datagraph System.out.println("Output datagraph after creating user"+ printDO(root)); return root;