Active record HasAndBelongsToMany sorting

2009-08-10 Thread Wayne Douglas
anyone know if it's possible to sort on a column in the association table using HasAndBelongsToMany ? I want a DisplayOrder column on the table1HasTable2 table: |table1 | |table1HasTable2| |table2| -- Cheers, w:// --~--~-~--~~~---~--~~ You

Re: WCFFacility

2009-08-10 Thread Gabriel Mancini de Campos
i have some like this: web.config serviceHostingEnvironment aspNetCompatibilityEnabled=true/ services service name=Autenticacao clear / endpoint address= name=login binding=basicHttpBinding contract=PR.Servico.Contrato.Autenticacao.ILogin identity

Re: Touble w/subdependencies when mixing fluent and XML component registrations in Windsor

2009-08-10 Thread sbohlen
Tuna: The combination of this suggestion (left-over interface assembly) and my leaving this alone over the weekend to resume work on it as Monday now rolls around have solved it for me. As usual, its NOT anything wrong with my framework of choice but indeed something wrong with my

ActiveRecord mapping against an Interface

2009-08-10 Thread JakeS
I've got several classes defined like so: public interface IRecentSpaceItem { [PrimaryKey] int Id { get; set; } DateTime LastUpdated{ get; } } [ActiveRecord] public class WhiteBoard : ModelBaseWhiteBoard, IRecentUpdated [ActiveRecord] public class Discussion:

Using AR to get just the mapping xml

2009-08-10 Thread Tyler Burd
Hi all, Is there a way to use ActiveRecord to generate the mapping xml to use with an existing nhibernate configuration? I want to use raw NHibernate for a project, but I would really like to be able to use the AR attributes to generate the mappings. I'm looking for something like this: var

Re: Design questions for resolution of IOC-ISSUE-161

2009-08-10 Thread Ayende Rahien
Hm,I would say that we need a LazyHandler, then, no? 2009/8/6 Krzysztof Koźmic krzysztof.koz...@gmail.com Hi, Funny, how we were discussing with Craig this very issue not further than two days ago. Anyway, I agree, that we should have something like ILazyComponentsProvider (being handler

Not working: Lazy FetchWhen.OnInvoke (Parent Child, Heirarchy)

2009-08-10 Thread William Chang
Here is my model setup: I have two entities, List and ListItem. The List class is the parent with the property public virtual List listParent {get;set;} to create the hierarchy. The ListItem class is the child or children, containing items for the list. The problem is when I do a Find() on an

RE: Design questions for resolution of IOC-ISSUE-161

2009-08-10 Thread Adam Langley
Perhaps there could be a mechanism to continue to be queried for the validity of this object? For example, if the main use for this would be managing WCF endpoints, they can transition to a faulted state, at which time they can no longer be used anymore, so its actually the ChannelFactory that

Re: Using AR to get just the mapping xml

2009-08-10 Thread jsmorris
If you add the isDebug flag to your activerecord facility, it will output all the hbm files for you in the same directory as your dll/exe. facility id=ar.facility pluralizeTableNames=true isDebug=true I hope this helps. Jason On Mon, Aug 10, 2009 at 8:40

Re: ActiveRecord mapping against an Interface

2009-08-10 Thread jsmorris
I think that you need to use the [HasManyToAny] attribute to map your collection of IRecentUpdated objects to a list of possible types. Take a look at http://www.castleproject.org/activerecord/documentation/trunk/usersguide/relations/hasmanytoany.html This is just off the cuff, but I believe

Re: Design questions for resolution of IOC-ISSUE-161

2009-08-10 Thread Ayende Rahien
inline On Tue, Aug 11, 2009 at 1:57 AM, Adam Langley alang...@winscribe.comwrote: Perhaps there could be a mechanism to continue to be queried for the validity of this object? For example, if the main use for this would be managing WCF endpoints, they can transition to a faulted state, at

Re: ActiveRecord mapping against an Interface

2009-08-10 Thread Markus Zywitza
Hi Jake, 2009/8/10 JakeS jakesteven...@gmail.com [ActiveRecord] public class WhiteBoard : ModelBaseWhiteBoard, IRecentUpdated [ActiveRecord] public class Discussion: ModelBaseDiscussion, IRecentUpdated You can get around it completely, if you use generic interfaces: public interface

Re: Using AR to get just the mapping xml

2009-08-10 Thread Markus Zywitza
Look into C.AR.Tests.Internal for how to get the generated XML. Ayende has also written a blog post on how to use AR types in NHibernate, so please search his blog. If you want to go the GetXmlMappings()-path, I'd be happy to apply a patch for that. -Markus 2009/8/10 Tyler Burd tb...@cudc.org

Re: Not working: Lazy FetchWhen.OnInvoke (Parent Child, Heirarchy)

2009-08-10 Thread Markus Zywitza
AR has the problem that if you don't use SessionScopes, it can't use lazy loading at all. Therefore lazy loading was disabled by default. AFAIR you have to set lazy=true in your AR config to enable lazy loading of many-to-one relations. -Markus 2009/8/11 William Chang diehardb...@gmail.com