New Posts New Posts RSS Feed: Support for abstract models
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Support for abstract models

 Post Reply Post Reply
Author
Tomasz Paprocki View Drop Down
Newbie
Newbie


Joined: 11-Oct-2012
Posts: 1
Post Options Post Options   Quote Tomasz Paprocki Quote  Post ReplyReply Direct Link To This Post Topic: Support for abstract models
    Posted: 11-Oct-2012 at 9:26am
Hi,

I have an issue with Breeze while using some EF abstract classes - there's an exception while parsing metadata on client side. Here's a simple model example that recreates this issue:

public abstract class Item
{
    [Key]
    public int Id { get; set; }

    public string Foo { get; set; }
}

public class SpecificItem : Item
{
    public int Bar { get; set; }
}

Problem starts while Breeze is trying to use undefined 'key' property for SpecificItem type in convertFromODataEntityType function (line 1251: var keyNamesOnServer = toArray(odataEntityType.key.propertyRef).map(core.pluck("name"));). Not only odataEntityType param lacks information about 'key' but also there is no information about other properties from base class (Item in this scenario).

Is there any support planned for abstract models in future? Also... Can we get any hint how to handle such scenarios atm? -  we want to keep our model the way it is now, so even some ugly, temporary workaround for Breeze would be great!

Keep up the good work! ;)

~ Tomasz
Back to Top
jtraband View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 19-Sep-2012
Posts: 55
Post Options Post Options   Quote jtraband Quote  Post ReplyReply Direct Link To This Post Posted: 11-Oct-2012 at 11:22am
We do have plans to implement support for abstract types but just haven't gotten to it yet.  No easy workarounds just yet. 

Please vote for this feature request using the feedback mechanism on the web site. ( small icon on the right side of any Breeze website page labeled "Feedback").  This helps us decide which features to focus on next.  This topic has already been added there.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down