Complex Types

6 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    1 posts
    Member since:
    Nov 2010

    Posted 23 Jun 2011 Link to this post

    The manual mentions the term complex type but I can't seem to find it anywhere else in the doc.  Is the complex type concept found in EF in OpenAccess ORM?
  2. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 28 Jun 2011 Link to this post

    Hi Jonathan,

     Actually that seems to be misleading for the customers in our documentation. The complex types you refer to are not yet implemented in OpenAccess ORM, but they are on our future TODO list. We will change the terminology used in our documentation in the topics that "complex-types" are being mentioned.

    Kind regards,
    Zoran
    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
  3. DevCraft banner
  4. Diego
    Diego avatar
    8 posts
    Member since:
    May 2012

    Posted 16 Oct 2012 Link to this post

    Is this feature (complex types) still not supported in the latest release? I'm having a hard time finding documentation about it.

    With EF, I could make an entity that contained a compelx type as a property and properly map it to a table column in SQL server like so:

    SQL: Person.Gender nvarchar(6)

    public class Person 
    {

    public virtual GenderADT Gender { get; set;}
    }

    [ComplexType]
        public class GenderADT : ADTEnumBase<GenderEnum>
        {
            #region Constructors


            public GenderADT() {}


            public GenderADT(string pGender) : base(pGender) {}


            public GenderADT(GenderEnum pEnumValue) : base(pEnumValue) {}


            #endregion


            [Column("Gender")]
            [Required]
            [StringLength(6, MinimumLength = 4)]
            public override string Value { get; set; }


            public static implicit operator GenderADT(GenderEnum pGender)
            {
                return new GenderADT(pGender);
            }


            public static implicit operator GenderADT(string pValue)
            {
                return new GenderADT(pValue);
            }
        }
  5. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 19 Oct 2012 Link to this post

    Hello Diego,

    I am afraid this feature is not implemented yet in the product.

    I am sorry for the inconvenience caused.

    Regards,
    Damyan Bogoev
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
  6. Diego
    Diego avatar
    8 posts
    Member since:
    May 2012

    Posted 19 Oct 2012 Link to this post

    Is it in the roadmap at all yet?

    Also, if we implement a generic repository do you see any problem with using EF for some tables and OA for others? I'd like to have OA on most of it and I'll use EF where Telerik OA is lacking functionality like entities that require complex types defined and mapped to db.
  7. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 22 Oct 2012 Link to this post

    Hi Diego,

    The support for complex types is on our to-do list and we will consider it as a future improvement in the product.

    You could both approaches but you should consider scenarios where you might need to load related data from entity which is managed by OpenAccess ORM context in an entity retrieved by EF context. You should try to avoid relations between these two setup in order to avoid runtime issues.

    Hope that helps.

    Greetings,
    Damyan Bogoev
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
Back to Top
DevCraft banner