What is the equivalent of <composite-element> in Castle ActiveRecord?

Posted by Daniel T. on Stack Overflow See other posts from Stack Overflow or by Daniel T.
Published on 2010-04-17T02:35:43Z Indexed on 2010/04/17 2:43 UTC
Read the original article Hit count: 351

I have a TrackLog that has a collection of TrackPoints:

public class TrackLog
{
    public string Name { get; set; }
    public ISet<TrackPoint> TrackPoints { get; set; }
}

public class TrackPoint
{
    public DateTime Timestamp { get; set; }
    public double Latitude { get; set; }
    public double Longitude { get; set; }
}

I'd like to map the track points as a collection of components, as this makes the most sense. According to the book NHibernate in Action, on page 187:

Collections of components are mapped similarily to other collections of value type instances. The only difference is the use of <composite-element> in place of the familiar <element> tag.

How would I do this using Castle ActiveRecord attributes?

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about castle-activerecord