Ticket T571455
Visible to All Users

Problems with using custom data models for the AuditTrail module

created 7 years ago

[DevExpress Support Team: CLONED FROM T569076: How I found out using Oids in clustered index in XAF is a very bad idea]
> One the most reliable ways would be ensuring that the default classes from the DevExpress.Persistent.BaseImpl library are not added
> into the list of exported types of your application. To do this, you can take the source code of these classes and implement your own
> versions in your project + configure the AuditTrailModule.AuditDataItemPersistentType property accordingly.

This is exactly what I did (see image attached) and when I am in Application Designer I can see my classes only, but for some reasons, somewhere original classes still end up in the app and clash with my own classes (unless I use different table names in which case both original and my tables are created).

As for default, you should probably introduce default attribute, something like DbTypeDefault("expression") so default expressions would be divided from db type because current system does not allow configuring primary keys with default value because all foreign key will be defined with the same value. Separate default attribute could solve this issue.

Answers approved by DevExpress Support

created 7 years ago

Hello Mario,

I have attached a working sample and my test database for you to test. This database was initially created and used when standard AuditDataItemPersistent and AuditedObjectWeakReference classes were in use. After that, I added fully custom classes and changed app settings. Please look for the "//Dennis: " strings in this project so as not to miss any important change. I hope this helps.

    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.