What is the equivalent of <composite-element> in Castle ActiveRecord?
- by Daniel T.
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?