I am trying to work out how to set up this relationship with ActiveRecord
attributes but can't work it out.
http://www.hibernate.org/hib_docs/nhibernate/html/components.html#components-incollections

This is basically the type of model I have. The child table has a composite
key (ParentType and User) with some extra data.

class ParentType
{
    [PrimaryKey(PrimaryKeyType.GuidComb)]
    Guid Id { get; set; }

    [HasMany(DependentObjects = true, MapType = typeof(ChildType))]
    ISet<ChildType> Children { get; }
}
class ChildType
{
    [BelongsTo]
    ParentType Parent { get; set; }
    User Owner { get; set; }
    ... a few properties ...
}
class User
{
    Guid Id { get; set; }
}

Any hints on how to get this working will be appreciated. I have just been
trying to get the relation between parent and child working so far without
any luck.
-- 
Jono

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to