There is no magic in a custom configured dialect ;)
http://fabiomaulo.blogspot.com/2009/06/nhibernate-configuration.html
<http://fabiomaulo.blogspot.com/2009/06/nhibernate-configuration.html>see: The
trick of custom Dialect

Fred, about the Jason's advise have a look to : NHibernate 3.0 cookbook page
239 to 246
http://nhforge.org/content/Books.aspx


On Mon, Jan 24, 2011 at 7:51 AM, Jason Dentler <[email protected]>wrote:

> You can also alter the mapping metadata to switch POID generators just
> before you build each session factory. You'll have to do this for each
> persistent class.
>
> There's some code in uNHAddIns to generate the SQL for audit triggers. That
> should give you some idea of how to get to this data and change it.
>
> It's not as easy as Fabio's suggestion, but it looks less magical.
>
> On Mon, Jan 24, 2011 at 4:47 AM, Fabio Maulo <[email protected]> wrote:
>
>> On Dialect.
>> You can inherit from NH's dialect and override the implementation
>> of  NativeIdentifierGeneratorClass or IdentityStyleIdentifierGeneratorClass.
>> Then configuring the Dialect you have what you need.
>>
>>
>> On Mon, Jan 24, 2011 at 7:04 AM, <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> i want to use my entities with three different Databases:
>>>
>>> Productive DB (SQLServer) -----> Export DB (SQLLite) ----> Customer DB
>>> (SQLServer)
>>>
>>> The mappings are the same for all three databases. The only thing that
>>> differs is how
>>> ID's are generated. In the Export DB the ID's have to be exactly as the
>>> ones in the
>>> Productive DB. So in this case i set the generator to "assigned" and copy
>>> the selected
>>> data (P -> E). In the Customer DB the exported data should be integrated
>>> with the
>>> existing data. In this case I need an generator (HILO) for the ID (E ->
>>> C).
>>> Is it possible to switch the ID generator in dependency of the
>>> SessionFactory?
>>>
>>> Thanks
>>>
>>> Fred
>>>
>>> --
>>> 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]<nhusers%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/nhusers?hl=en.
>>>
>>
>>
>>
>> --
>> 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]<nhusers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>
>  --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>



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