NHibernate.FlowQuery v0.7 Released

Today I released a minor update of NHibernate.FlowQuery (FlowQuery). Version 0.7 of FlowQuery can be downloaded here. The new version merely adds a small amount of functionality for joining hidden members and using select setup when projecting queries. It also fixes a bug when selecting hidden fields (which was somehow overlooked in the previous version).

The added functionality for joining hidden members is only a few overloads on the Join-methods to pipeline lambda expressions on to the Reveal-helper. This to reduce verbosity when joining.

An example, with the previous version:

Post post = null;
Comment comment = null;

session.FlowQuery<User>()
    .Join(u => u.Posts, () => post)
    .Join(Reveal.ByConvention(() => post.Comments), () => comment)
    .Select();

With the new version:

Post post = null;
Comment comment = null;

session.FlowQuery<User>()
    .Join(u => u.Posts, () => post)
    .Join(() => post.Comments, () => comment)
    .Select();

For the sake of convenience there is also overloads to provide your own IRevealConvention:

session.FlowQuery<User>()
    .Join(u => u.Posts, () => post)
    .Join(() => post.Comments, () => comment, new UnderscoreConvention())
    .Select();

In the previous version of FlowQuery you could not use strings in the Use-part of a select setup. In the new version this is fixed and you don’t have to create your own PropertyProjection to overcome this misfortune. In other words…

session.FlowQuery<User>()
    .SelectDistinct()
        .For(x => x.Firstname).Use("Firstname")
        .Select();

…is now possible!

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: