NHibernate.FlowQuery v0.9 Released

Just uploaded a new version of NHibernate.FlowQuery ( FlowQuery ). Version 0.9 of FlowQuery can be downloaded here. The new version is built against both NHibernate 2.1.2 and NHibernate 3.1.0. Both builds contains several minor bug fixes and small improvements to the joining API. The build against NHibernate 3.1.0 however also contains overloads for all Join methods that takes a parameter specifying extra on-clause criteria.

Example:

UserGroupLink link = null;

var activeGroupIds = Query<User>()
    .Join(u => u.Groups, () => link, u => link.IsActive)
    .Select(u => link.Group.Id);

The above Join-call will translate into something like this ( in the ICriteria API ):

criteria.CreateAlias("Groups", "link", JoinType.InnerJoin, Restrictions.Eq("link.IsActive", true));

That’s about it for now.

Enjoy! (:

/Niklas Källander

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: