Sorry, I'll try to clarify.

My mapping is defined similar to:

<id name="ID" type="Foo.UserTypes.IntZeroAsNullIdentifier, foo">
                        <generator class="hilo"/>
</id>

When running a test, there is an error similar to "type is not a
ValueTypeType". This seems to be because IntZeroAsNullIdentifier does
not inherit from PrimitiveType.
IntZeroAsNullIdentifier is a UserType that will recognize database
values of 0 as null. This is used for null many-to-many associations

I was looking for any guidance with using HiLo with a custom type.
Currently, I'm thinking of directly inheriting from PrimitiveType and
use similar code for Int32Type, but recognizing 0 as null.

Thanks,
-David

On Thu, Jun 25, 2009 at 4:34 PM, Fabio Maulo<[email protected]> wrote:
> I don't understand.
>
> 2009/6/25 David Henry <[email protected]>
>>
>> Hello,
>>
>> I am looking into replacing our id columns that are currently MSSQL
>> identity to HiLo generated values to support UoW.
>>
>> To support some legacy data associations, we have the concept that 0
>> means null for the association mappings - so we have a UserType that
>> uses 0 as a null identifier for integer.
>>
>> As far as I have gathered, the TableHiLoGenerator seems to use
>> identifier types that are derived from PrimitiveType. Does anyone have
>> any suggestions on how to resolve this, or can clarify the identifier
>> types that are to be used with HiLo?
>>
>> Thanks,
>>
>> David
>>
>>
>
>
>
> --
> Fabio Maulo
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to