mmmmm mixing things..."formula + HiLo" :  formula is for db-side values -
HiLo is app-side values mixed with db-side each X times.

"property is an incremented Int64 based on another property in the component
in the same table" :
tables does not have properties, table has columns. If you need a value of a
property based on value of another property pure C# is enough.

"Can I somehow mock an hilo identifier generation inside an interceptor just
before inserts?":
You can create a an instance of TableHiLoGenerator in your DAO/repository,
configure it and then call Generate(session, null). If you want a more
sophisticated solution you can use an implementation of IUserType or even
more exotic you can use a PreInsertListener.

2009/6/23 Mike Nichols <[email protected]>

>
> I have a property that is part of a component composing a kind of
> 'Friendly' number for users. This should be set at INSERT and never
> changed.
> The property is an incremented Int64 based on another property in the
> component in the same table.
>
> I looked at generated properties, but it looks like I can't combine
> _formula_ with that. I'd like to somehow reuse the HiLo algorithm NH
> uses for its identifiers since this is a similar setup but am not sure
> how.
>
> Can I somehow mock an hilo identifier generation inside an interceptor
> just before inserts?
> I'd rather avoid creating db level code for this sort of thing but
> will if there isn't a better alternative.
> >
>


-- 
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