Chili.Opf3 Send comments on this topic.
PersistBehaviours Enumeration
See Also   Example
Chili.Opf3 Namespace : PersistBehaviours Enumeration




The member of this enumeration mark and enhance properties with special behaviour applied during the save process of a persistent object.

Syntax

Visual Basic (Declaration) 
Public Enum PersistBehaviours 
   Inherits Enum
Visual Basic (Usage)Copy Code
Dim instance As PersistBehaviours
C# 
public enum PersistBehaviours : Enum 
Managed Extensions for C++ 
__value public enum PersistBehaviours : public Enum 
C++/CLI 
public enum class PersistBehaviours : public Enum 

Members

MemberDescription
None A property marked with this flag is always persisted. It does not matter if the persistent is inserted or updated in the storage. This is the default behaviour of a property.
DontInsert A property marked with this flag is not inserted. If the persistent object is updated this property is also updated.
DontUpdate A property marked with this flag is not updated. If the persistent object is inserted this property is also inserted.

Example

The following example shows a property that is only saved during an insert of the persistent object. The FieldAttribute is used to connect a property with a field of the entity. For additional information check out the documentation of the FieldAttribute or the PersistentAttribute.
C#Copy Code
            [Persistent("USER")] 
public class User 

    private string _name = null; 
     
    [Field("NAME", PersistBehaviours = PersistBehaviours.DontUpdate)] 
    public string Name 
    { 
        get { return _name; } 
        set { _name = value; } 
    } 
     
    // ... Other properties and fields. 

    

Remarks

This enumeration is used to mark properties with special persisting behaviour. It allows to control the persisting behaviour on properties during insert and update operations of the persistent object. DontInsert means, for example, that the value of the property is not inserted during an insert operation of the persistent object.

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Chili.Opf3.PersistBehaviours

Requirements

Namespace: Chili.Opf3

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Chili.Opf3 (in Chili.Opf3.dll)

See Also