これは、次のタイプのオブジェクトを取得するという私の仮定に基づいています。
public class Fruit : IBasicFruit, IFruitDetails
{
// IBasicFruit implementation
public string name { get; set; }
public string color { get; set; }
// IFruitDetails implementation
public string scientific_name { get; set; }
public bool often_mistaken_for_vegetable { get; set; }
public float average_grams { get; set; }
public int century_domesticated { get; set; }
}
...そしてそれからタイプのオブジェクトを作成します:
public class BasicFruit : IBasicFruit
{
public string name { get; set; }
public string color { get; set; }
}
...は「射影」または「型射影」として知られています(この射影は匿名型だけに適用されるわけではありません)。
ここで、サーバーからクライアントアプリケーションにシリアル化されたものを送信するとします。ここで、高度なファームロジックがこれらの2つの文字列に対して実行され、ORMがタイプをBasicFruit
認識しないサーバーにのみ返送されます。エンティティタイプBasicFruit
の。オブジェクトに基づいて(に存在しないプロパティを無視して)Fruit
新しいオブジェクトを作成すると、ORMはそれを永続化できます。これは、サブセットからスーパーセットに移行するため、投影の反対です。それとも、投影と見なされますか。 、またはこれは単なるマッピングですか?Fruit
BasicFruit
BasicFruit
投影はマッピングの一形態と見なすことができますか?