Ticket AS14692
Visible to All Users

Calculated persistent properties - Add the Fetch parameter to PersistentAlias

created 18 years ago

I need to fetch a number of elements in child collection, but don't want to persist it. Here is the code to illustrate my situation:

C#
[Association] public XPCollection<CoolClass> Cools { get { return GetCollection<CoolClass>("Cools"); } } int _cnt = -1; [PersistentAlias("Cools[].Count()", Fetch=True)] public int CoolsCount { get { return (Cools.IsLoaded || _cnt < 0) ? Cools.Count : _cnt; } set { _cnt = value; } } override OnLoading() { _cnt = -1; }

Proposed Solution:
Add a ReadOnly parameter to the PersistentAlias attribute

Show previous comments (1)
DevExpress Support Team 10 years ago

    @Andreas:

    This ticket describes a feature request that is not implemented yet. The code provided here is supposed to illustrate how a persistent calculated property can be declared when the feature is implemented. This code doesn't work in the current version.

    There's no universal solution at the moment. If you need a solution for a specific scenario, please create a new ticket and describe your scenario in detail. We will do our best to help you.

    Also refer to the discussion in the S36566 ticket.

    MB MB
    Mario Blatarić 8 years ago

      Hi,

      This is still not implemented?

      Regards,
      Mario

      Dennis Garavsky (DevExpress) 8 years ago

        @Mario:
        The original proposed solution is not implemented.
        Would you please submit a separate ticket using the https://www.devexpress.com/Support/Center/Question/Create service and attach your test samples with your persistent classes code, so we can replicate and research your concrete business requirements and tell you for sure whether there are already suitable solutions in the current version and whether they are ever related to the current thread (or can be addressed differently)? We want to help you and look forward to hearing from you.

        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.