This is a migrated thread and some comments may be shown as answers.

Complex Types

5 Answers 95 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonathan
Top achievements
Rank 1
Jonathan asked on 23 Jun 2011, 04:54 PM
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?

5 Answers, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 28 Jun 2011, 04:28 PM
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.
0
Diego
Top achievements
Rank 1
answered on 17 Oct 2012, 12:26 AM
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);
        }
    }
0
Damyan Bogoev
Telerik team
answered on 19 Oct 2012, 01:32 PM
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.
0
Diego
Top achievements
Rank 1
answered on 19 Oct 2012, 03:46 PM
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.
0
Damyan Bogoev
Telerik team
answered on 22 Oct 2012, 02:48 PM
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.
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Diego
Top achievements
Rank 1
Damyan Bogoev
Telerik team
Share this question
or