Property Kind of MetaProperty : CustomBehavior, Calculated

14 posts, 1 answers
  1. test
    test avatar
    27 posts
    Member since:
    Feb 2008

    Posted 31 Jul 2010 Link to this post

    Hi,

    I'm testing your new domain model and I'm looking for documentation on the MetaProperty's property "Kind", could you explain to me when we could use the "custombehavior" and "calculated" values ? and how to use it ?

    Thanks in advance.
  2. Serge
    Admin
    Serge avatar
    375 posts

    Posted 03 Aug 2010 Link to this post

    Hello test,

     While revising the implementation of this feature I we have found out there are some issues that need to be addressed, until they are you will not be able to use this facet. We will be releasing an internal build this week, however it is not likely the fix for this to be included in it. 

    This of course will be addressed in the following service pack. I am sorry for the inconvenience caused. For the time being please share some light on what you are trying to accomplish, there might be a solution not including this particular facet.

    Looking forward to your reply.

    Kind regards,
    Serge
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. test
    test avatar
    27 posts
    Member since:
    Feb 2008

    Posted 03 Aug 2010 Link to this post

    Hi,

    Thanks for your response, today I can't explain to you what I want to do with this facet because I dont know what this facet can do.

    For me a metaproperty of kind calculated could be very interesting, does it means this property is not mapped to database ? I don't know, so could you explain to me the signification of this value, and the value custombehavior ?

    No problem for me to wait the next release or service pack, but what I need today is explanation...

    Thanks for your great support.
  5. Serge
    Admin
    Serge avatar
    375 posts

    Posted 04 Aug 2010 Link to this post

    Hello test,

    These two options will be fully utilized when we provide support for importing classes and methods you have written into the domain model.

    The calculated option should specify that the column is somehow calculated by others in its get accessor. This property is not persisted to the database.

    The custom behavior option can be used for a property that has both get and set accessors that must implement complex custom logic. Usually the get should calculate the value from other properties and set modifies one or more other properties.

    These are not yet here, so I suggest sticking to defaults and using partials with other properties that do the hard work.

    I do hope this helps.

    Best wishes,
    Serge
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. test
    test avatar
    27 posts
    Member since:
    Feb 2008

    Posted 05 Aug 2010 Link to this post

    Thanks for your answer, the beavior you describe are excatly what i was expecting.

    Do you know when we could use this properties ?

    I've another thread opened called "how to extend a class", it means "how to use partial class", I don't find a simple example in your code library or documentation for this, have you ?
  7. Answer
    Serge
    Admin
    Serge avatar
    375 posts

    Posted 06 Aug 2010 Link to this post

    Hello test,

    I am glad to see that this is what you need. However I cannot give an exact timeframe, this functionality should be available in the following service pack. 

    I will answer your partials issue in the other thread.

    Kind regards,
    Serge
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Patrice Boissonneault
    Patrice Boissonneault avatar
    18 posts
    Member since:
    Mar 2010

    Posted 29 Mar 2011 Link to this post

    It make sense that calculated fields are not persited to database, but can you tell us if they are going to be cached (L1 or L2) or recalculated at each access of the get property accessor?

    Can also you give an example on how we would use each of these scenario?

    Thanks.
  9. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 30 Mar 2011 Link to this post

    Hi Patrice Boissonneault,

    If you are using computed columns on the sql server the corresponding data will be cached in L1 or L2 cache. Otherwise if the information is being calculated in the property get accessor it will not be cached because it is not fetched from the sql server.

    Greetings,
    Damyan Bogoev
    the Telerik team
  10. Patrice Boissonneault
    Patrice Boissonneault avatar
    18 posts
    Member since:
    Mar 2010

    Posted 18 Apr 2011 Link to this post

    I was more talking about Kind Calculated or Custom Behaviour.  Are those field value going to be cached in L2?

    Are these actually ready for usage now?  Can you provide some samples that make use of them?

    Thanks.
  11. Serge
    Admin
    Serge avatar
    375 posts

    Posted 20 Apr 2011 Link to this post

    Hi Patrice Boissonneault,

    As previously stated the Custom Behaviour as well as Calculated properties are currently not supported at all. If you were to specify them through the designer you will get the default behaviour for the selected property. The default is Persistent.

    If  you however have a column that is calculated on the server you can use PersistentReadOnly to make sure it is accessed correctly and not inserted. 

    I am sorry for any inconvenience that this has caused you.

    Best wishes,
    Serge
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Mark
    Mark avatar
    1 posts
    Member since:
    Mar 2013

    Posted 13 May 2013 Link to this post

    Hello,

    Has there been any more work on this? I have columns that are encrypted on the database, so I would like to unencrypt them before passing them through. I would just add it to the T4 code modules you have, but I can't put in custom attributes through your modeling framework. (Like marking a field as needing to be decrypted in the code)

    If this (Kind) field is active, perhaps that will do what I need.

    Any thoughts?

    Thanks,
    Mark
  13. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 16 May 2013 Link to this post

    Hello Mark,

     Our next release will feature great improvements to our code generation framework. We will make it much more extensible and you will be able to easily add what you need there.

    Kind regards,
    Petar
    the Telerik team
    OpenAccess Samples Kit boasts 50+ sample applications providing diverse real-life business solutions. Click to read more and see OpenAccess ORM in action.
  14. Chris
    Chris avatar
    2 posts
    Member since:
    Apr 2013

    Posted 23 Oct 2013 Link to this post

    Hi,

    Any updates on this? I can't find any documentation that states the kind is working. 

    If not have you guys come up with an alternative?

    Thanks


  15. Kaloyan Nikolov
    Admin
    Kaloyan Nikolov avatar
    118 posts

    Posted 28 Oct 2013 Link to this post

    Hello Chris,

    The Kind property (on the context of any Property of a DomainClass) specifies the type of access for the property. It could be:
    • Default - a property that is transient and is not saved to the data store or tracked for changes.
    • Persistent - a property that is saved to the data store and is tracked for changes.
    • PersistentWriteOnly - a write-only property.
    • PersistentReadOnly - a read-only property.
    • CustomBehavior - a property that is not saved to the data store. Typically, the Get accessor calculates the value from other properties, and the Set accessor modifies other properties.
    • Calculated - indicates that the property is backend calculated (computed).

    *last two are not available under fluent mapping yet.

    More details you could read in the following articles:
    Property Window
    Work with Computed Columns
    Setting DataAccessKind with Fluent Mapping

    The "Kind" property should work as expected. If you experience any issues or difficulties determining the proper value for a given case please share more details and we will be happy to help you.
     

    Regards,
    Kaloyan Nikolov
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
Back to Top
DevCraft banner