- **status**: unassigned --> invalid
- **Milestone**: 4.5.2 --> 4.7-Tentative
- **Comment**:

This behavior is well documented in the immsv README (and should also be so in 
the IMMSV_PR) since OpenSAF4.3. It has worked this way since OpenSAF was 
created.

My opinion is that the real problem is the strange definition of default in SAF 
IMM as
being tied to object-create. A better definition of attribute default value 
would be what
I call "strong default". This means that if you have defined a default then it 
is impossible to assign the empty value (NULL) to that atribute. An attempt to 
do so will result in the imm
replacing it with the default value. That is a clean and mor normal definition 
of a default.
See ticket #1425.

In addition, no one has complained about this that I am aware of and some could 
potentially even depend on this behavior.  An application that wants to assign 
the NULL/empty value to an attribute should not use the current default value 
mechanism. From the README: 
================================
Common missunderstandings about attribute defaults.
---------------------------------------------------
Imm class definitions allow the declaration of a default value to be defined
as part of an attribute definition.

(i) A default declaration is only allowed for single valued attributes (no
concept of a multivalued default exists).

(ii) Default values are assigned at object creation. Default values are NOT
assigned if an attribute is set to the empty/null value by a modification.

(iii) Default values are assigned at cluster restart for any attributes that
are null/empty and that have a default. This is a special case of (i) because
imm loading actually uses the regular imm API to recreate the imm contents.
In particular, saImmOmCcbObjectCreate is used to recreate all objects from
the file-system image.
================================





---

** [tickets:#1456] imm: IMM object has different attribute value after 
reloading it from PBE**

**Status:** invalid
**Milestone:** 4.7-Tentative
**Created:** Fri Aug 21, 2015 01:05 PM UTC by Anders Widell
**Last Updated:** Fri Aug 21, 2015 01:05 PM UTC
**Owner:** nobody


There is a scenario when an IMM object can be different after reloading it from 
PBE, compared to what it looked like when it was saved to PBE. This happens 
when an attribute has a default value in the class definition, but the 
attribute value has been deleted (been set to NULL) in the object. When 
reloading the object from PBE, the attribute will again be set to the default 
value.


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to