jonwagner / Insight.Database

Fast, lightweight .NET micro-ORM
Other
861 stars 145 forks source link

Insert entity with relation (one to one) #394

Closed falvarador closed 5 years ago

falvarador commented 5 years ago

I am currently trying to insert a "Person entity" that has relations (one to one) and collections (one to many) associated. My idea is to be able to insert in a unique SP the "Person entity", its realtions and its collections, to do that I tried the insert method by using type as table as it is detailed in Insight.Database Wiki. It works fine for collections, but, I am missing a method able to do the same but considering relations (one to one).

Is currently there a way to do that, or is it possible to add this function (insert relation one to one)?

jonwagner commented 5 years ago

If you add the related fields to the TVP, insight should automatically pick them up on the sub-object if they are named uniquely.

On Mar 22, 2019, at 12:52 AM, Freddy Alvarado R notifications@github.com<mailto:notifications@github.com> wrote:

I am currently trying to insert a "Person entity" that has relations (one to one) and collections (one to many) associated. My idea is to be able to insert in a unique SP the "Person entity", its realtions and its collections, to do that I tried the insert method by using type as table as it is detailed in Insight.Database Wiki. It works fine for collections, but, I am missing a method able to do the same but considering relations (one to one).

Is currently there a way to do that, or is it possible to add this function (insert relation one to one)?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/jonwagner/Insight.Database/issues/394, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABk3dPWaaxRUz-h5BVA9WIPlQIQJL28Lks5vZGGXgaJpZM4cC142.