I have C # classes that use Inheritance on the server side of the web API. There are some 'one of two many' navigation properties in the base / super class, which are common to all heritage classes. These classes are not EF or NF classes.
Breeze generates base classes and heritage classes in metadata and shows navigational properties from the base class on inherited classes.
When the data is being loaded from the API, the "link" with "hair" -> "parent" side of the linked navigation property "links" correctly, but the base Reverse "parent" -> "hair" does not map the relationship to the class. / P>
If I have moved the navigation property to the inherited class, from the base / super class, Breeze connects parents to all the parents in the right way.
Breeze creates organizations on the client side Which accurately reflects the size above and ko.observable for many of the and. Vehicles -> Fines) properties.
If I ask the server for the list of motorists and motorcyclists first, then all is well, I again ask separately from the list of fines and properly exhort, "OK "I can say" Ok.MotorVille.ID "or" OK.Motorcill.ID ", depending on type and can get base / super class properties, such as ID too.
Although the air does not link "vehicle. Finn", "motorbike.fines" and "motorcyclefin" navigation properties They live empty arrays, even if the "fine" unit is properly connected with the vehicle, motorwitch and motorcycle drivers.
If I move the navigation property to the child / heritage class, as expected.
public class fine {public id id (get; set;} / / primary key public int vehicle iid {received; set;} // foreign key mass decimal amount {receive; set;} ... etc} Public Sector Vehicles {Public Ent ID (Receive; Set;} // Primary Key ... Other General Properties / Public IList Fines (Received) Set;} // Normal Nav asset} public square motorcycle {public string mudguardcolour {get; T;} ... other special properties public IList Fines (set); set;} // common NAV property is now in the child's orbit) Public category motorists {public string bompcouple; } ... other special properties}
This is to me with "fine.vehicle.id", "fine.motorVehicle.bumperColour" and "fine.MotorCycle.mudguardColour" as well as parents Let's give -> Child Relationships "vehicle.fines [0] .the command and" motorcycle. Fin [0]. ".
When I am on the base / super class, these names Geshn have properties can of air / How can get set up? To avoid repeating the child / inheritance classes?
PS: I am not using EF or National, but my Metadata NH layout (from air NH samples) as well as Breeze essential foreign key related documents etc.
PPS: This works 100% for all the normal sections, which do not use legacy setup.
Hope that I have explained adequately?
Code:
Related category:
Navigation properties: [{Named Servers: Vehicle, Entity Typnam: Vehicle, Hescat: True, Association Name: AN_Fine_FineId, Foreign KeynameOnverver: [ ID]}]
Comments
Post a Comment