I have the following mapping:

    <property name="TopLevelGenre" column="top_level_genre"
type="Boo.NHibernateExtensions.ArrayType, Boo.NHibernateExtensions"
update="false" insert="false" />

And the following projection as part of my query criteria:

    Projections.Alias(Projections.SqlFunction("array_agg",
NHibernateUtil.String, Projections.Property("genre.Name")),
"TopLevelGenre")

When the mapping occurs, the property value is a string array instead
of the custom type (Boo.NHibernateExtensions.ArrayType). This would be
the expected behavior if the custom type was not specified.

This works fine when I have the following query:

    var query = session.CreateSQLQuery(@"
      SELECT title_id, array_agg(g.name) AS top_level_genre
      FROM Title t
      INNER JOIN title_genre tg USING(title_id)
      INNER JOIN genre g USING(genre_id)
      WHERE t.title_id=21887
      GROUP BY title_id;
    ").AddEntity(typeof (Title));

What am I missing?

Thanks!

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

Reply via email to