From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-08 05:02:54
|
[ http://216.121.112.228/browse/NH-2629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20848#action_20848 ] Fabio Maulo commented on NH-2629: --------------------------------- Please send us a mapping and classes to recreate the issue. Thanks. P.S. do it ASAP if you want it fixed for NH3.2 > Typedef reference in composite key (in hbm files) > ------------------------------------------------- > > Key: NH-2629 > URL: http://216.121.112.228/browse/NH-2629 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Massimiliano Alberti > > I'm using a UserType. I have a typedef at the beginning of the file, like this: > <?xml version="1.0" encoding="utf-8" ?> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false"> > <typedef name="AnsiStringTrimmed" class="Utils.AnsiStringTrimmed, Utils" /> > If I reference AnsiStringTrimmed in a property it works, like this: > <property name="Field" type="AnsiStringTrimmed" not-null="true" length="6" /> > But if I try to use it in a key-property element it doesn't work, like this: > <composite-id name="PKey" class="Project.PKey, Project"> > <key-property name="Field" type="AnsiStringTrimmed" length="3" /> > I get a MappingException like this: Could not determine type for: AnsiStringTrimmed, for columns: NHibernate.Mapping.Column(Field). > If I use the full name of the usertype it works correctly (Utils.AnsiStringTrimmed, Utils) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |