Criteria would be a mess, yes!
On Thu, Nov 13, 2008 at 9:08 PM, Gauthier Segay <[EMAIL PROTECTED]>wrote:
>
> On 1, I'm not affected (managing flush explicitely when I'm bitten)
> but that seems nice, thanks for that!
>
> On 2, it would be great to have base IRepository interface(s) because
> static ActiveRecordMediator is a smell when mocking.
>
> However what would be great is to have this in a dedicated Component
> (say Castle.Components.Repositories) assembly without any dependency
> over AR/NH, then have specialization in AR assembly, something like:
>
> public interface IRepository<TEntity, TEntityKey, TCriteriaDescriptor>
> {
> // most of ActiveRecordMediator<TEntity> signatures here
> }
>
> this means that abstraction could work for another framework without
> too much work (well criteria descriptor is not easy thing).
>
> Also, I'm unsure but the signatures of ActiveRecordMediator could have
> some polishing (mainly order of parameters), and maybe generalizing
> pagination parameters for FindAll overloads with some boiler plate
> structure that may join Castle.Components.Pagination would be great
> (sometimes, it's not "common sense" to pass pagination parameters via
> DetachedCriteria on the call site)
>
>
> On Nov 13, 4:35 pm, "Markus Zywitza" <[EMAIL PROTECTED]> wrote:
> > Hi all
> >
> > I wanted to inform everybody on what I am planning for Castle
> ActiveRecord
> > in the near future.
> >
> > 1) Due to the discussion on flushing last week, I am currently trying to
> > make everybody happy. How? I added another attribute to the
> > activerecord-tag: flush. This attribute can have one of four values:
> > classic: (default) SessionScopes flush automatically, TransactioScopes on
> > commit. This represents the behaviour of RC3 and is therefore the
> default.
> > auto: Both type of scopes flush atomatically
> > leave: Both type of scopes flush when committing. This is effectively
> when
> > leaving the scope.
> > transaction: TransactionScope has auto-flush, SessionScope flushes on
> > disposal only. This allows users to use SessionScope for read operations
> > without a penalty for first level cache checking and having autoflush
> while
> > in a TransactionScope for updates:
> > using (new SessionScope())
> > {
> > // manual flush required
> > using (new TransactionScope())
> > {
> > // auto-flush active
> > }}
> >
> > The new functionality is already there (locally), but I'm still working
> on
> > some failing tests. Expect the commit somewhere on the weekend.
> >
> > And there is a little breakign change involved: IConfigurationSource has
> > another attribute. Do you know anyone who rolled their own
> > IConfigurationSource implementations?
> >
> > 2) For medium term, I wanted to add some IRepository<T> to ActiveRecord.
> > Originally I thought about using svn:external to include Rhino.Commons,
> so
> > IRepository and the other goodies were always built against AR trunk.
> With
> > Ayende dropping IRepo support in Rhino Commons, I wonder if it could be
> > added to AR directly as an alternative to ActiveRecordMediator.
> > While Mediator is useful, IRepository allows to extend repositories
> easier
> > than with mediator and look them up in MicroKernel/Windsor.
> >
> > Any thoughts on this?
> >
> > -Markus
> >
>
--
Tuna Toksöz
Typos included to enhance the readers attention!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" 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-devel?hl=en
-~----------~----~----~----~------~----~------~--~---