Persisting a Class You Didn't Create

Thread is closed for posting
2 posts, 0 answers
  1. Jeff
    Jeff avatar
    51 posts
    Member since:
    Aug 2007

    Posted 03 May 2009 Link to this post

    I must be missing something basic: I'm trying to persist a System.Drawing.Color object as a field in a persistent class. The OpenAccess compiler tells me this type is not supported and that I must declare it Transient.

        public class ProductVersion 
            private string m_strModelNumber; 
            private System.Drawing.Color m_ColorRgb; 

    Is there a way to use a class that isn't marked Persistent (like the Color class) as a field?
  2. Zoran
    Zoran avatar
    534 posts

    Posted 04 May 2009 Link to this post

    Hello Jeff,

    It is not possible to have fields of complex .NET types because they do not have any proper database representation. You can only have references to other classes that are persistent themselves, hence have a database table that represent them.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top