Hey Martin,
The interfaces are lacking some of the methods simply because they weren't
pulled up at time of creation, any that are missing most definitely should
be introduced. As for conventions just for ToMany, that sounds like a good
idea too. For the time being you could get away with using an
IRelationshipConvention like so:

public class ToManyConvention : IRelationshipConvention
{
  public bool Accept(IRelationship target)
  {
    return (target is ICollectionRelationship);
  }

  public void Apply(IRelationship target)
  {
    var actualRelationship = (ICollectionRelationship)target;

    // do stuff
  }
}

Of course that won't be of much use unless you pull the members up to the
interface :)

I've created two issues for this, one to pull the members
up<http://code.google.com/p/fluent-nhibernate/issues/detail?id=157>,
and another to create the new
convention<http://code.google.com/p/fluent-nhibernate/issues/detail?id=158>
.

Thanks,

James

On Mon, Mar 23, 2009 at 4:00 PM, Martin
<martin.hornag...@marstangroup.com>wrote:

>
> James,
>
> In a current project the majority of my one to many and many to many
> are sets rather than bags.
> Currently AsSet, AsList, AsBag are implemented in ToManyBase, but
> there is no contract in ICollectionRelationship.
> Therefore they are not available to conventions which use
> IOneToManyPart or IManyToManyPart.
> Is there is any reason the methods are not in the interface?
> If not would you consider adding them.
>
> Also it would be useful to be able to set the default collection type
> (bag/set) for all ToMany parts.
> This would be achievable if we had a IToManyConvention which accepted
> an IToManyPart.
>
> Thoughrs?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to