Ticket T578064
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

How to map a property to a read-only database column

XAF Object with Field from Database

created 7 years ago

Hello,
 I have an XAF business object and one of the properties is calculated by a trigger in my database. I need to show the property on my business forms, but when I utilize the read only approach of PersistentAlias and Persistent, the update statement for the object includes this field and overwrites my database value.
 What is the proper way to show this field in the UI, but not update the database.

Thank you.

Comments (1)

    I just converted to a delayed property and added (true) to the attribute so I am okay for now. Still not sure why this does not fire.GetPropertiesListForUpdateInsert

    Answers approved by DevExpress Support

    created 7 years ago

    We have added support for read-only database columns in XPO. If you would like to test this feature prior to the official 18.2 release, get the preview build in the How to map a property to a read-only database column ticket. Your feedback is welcome.

      Other Answers

      created 7 years ago (modified 7 years ago)

      Hello, Robert.

      Please refer to the How to map a property to a calculated database column (implement a read-only persistent property) ticket for a possible solution.

        Comments (2)

          I've tried this, but the GetPropertiesListForUpdateInsert never fires in the custom UnitOfWork.

          DevExpress Support Team 7 years ago

            I'm afraid we cannot determine why this method is not called based on your reply. Would you please send a small sample project demonstrating this issue to us?

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.