Fluentnhibnate:如何映射列表的元素
我有以下类别:
public abstract class AbstractGeometry : IGeometry
{
// something
}
public class CompositeGeometry : AbstractGeometry
{
IGeometry MainGeometry { get; set; }
IList<IGeometry> Geometries { get; set; }
}
因此,复合地体测定法具有MAINE计量学和几何形状列表。任何给定的几何形状都可以属于多个复合地理。
我有一个用于抽象测定法的映射类,另一个用于复合地理的映射类。
现在我想知道:是否可以处理复合地体图映射类中的几何列表的映射?
在数据库中,我已经创建了三个表:抽象地体测定法,复合地理测定法和复合地理计。
复合地理表包含一个抽象的测定法和Maingemetryid。
复合元素表包含一个复合地体晶体和一个抽象的分析化。
I have the following classes:
public abstract class AbstractGeometry : IGeometry
{
// something
}
public class CompositeGeometry : AbstractGeometry
{
IGeometry MainGeometry { get; set; }
IList<IGeometry> Geometries { get; set; }
}
So the CompositeGeometry has a MainGeometry and a list of geometries. Any given geometry may belong to multiple CompositeGeometries.
I have a mapping class for AbstractGeometry and another mapping class for CompositeGeometry.
Now I was wondering: Is it possible to handle the mapping for the list of Geometries in the mapping class of CompositeGeometry?
In the database I already created three tables: AbstractGeometry, CompositeGeometry and CompositeGeometryElements.
The CompositeGeometry table contains a AbstractGeometryId and a MainGeometryId.
The CompositeGeometryElements table contains a CompositeGeometryId and a AbstractGeometryId.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)