On Wednesday, December 5, 2012 7:36:37 PM UTC+1, Oskar Berggren wrote:
>
> What is the XML that FluentNH generates for TypeFactory.GetStringType(2)?
>
> /Oskar
>
>
With the following filter definition:
public class LanguageFilter : FilterDefinition
{
private const string ColumnName = "lang";
public const string ParameterName = "langCode";
public LanguageFilter()
{
var x = TypeFactory.GetAnsiStringType(2);
WithName(RepositoryFilterName.ContextLocale.ToString())
.AddParameter(ParameterName, TypeFactory.GetStringType(2))
.WithCondition(string.Format("{0} = :{1}", ColumnName,
ParameterName));
}
}
I get the following output from FluentNH "filter-def.ContextLocale.hbm.xml":
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<filter-def name="ContextLocale" condition="lang = :langCode">
<filter-param name="langCode" type="String" />
</filter-def>
</hibernate-mapping>
So seems like the length parameter is not propagated down to the actual
mapping. FluentNH or NH maybe think its not needed? Inspecting the type
returned from TypeFactory, it looks correct, Length = 2, and all that.
-Svend
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/4u3vj5U4ZXoJ.
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/nhusers?hl=en.