Hello,

This forum here is for discussion about contributing to NHibernate. Please 
ask support questions on the user forum, 
https://groups.google.com/forum/#!forum/nhusers

Frédéric.

Le jeudi 6 décembre 2018 07:47:11 UTC+1, sweettooth a écrit :
>
> Hello
>
> Can you please help us?
> We are working on a C# project, which heavily relies on nHibernate and we 
> need to migrate from *MySQL* to *Postgres*. nHibernate makes this process 
> rather easy, however there are some questions that we can’t find answers 
> for…
>
>
> The first problem we’ve encountered is foreign keys. We have a lot of 
> tables with one-to-one references with the following options:
> *On Update = CASCADE*
> *On Delete = RESTRICT*
>
>
> however Hibernate Attributes Mapping *Key* property attribute *OnDelete* 
> doesn’t 
> have the *restrict* option and there is no *OnUpdate* attribute… So what 
> should we do - is manual foreign keys addition the only way?
>
>
> Another issue is Auto Increment - how should we enable it in case of 
> *Postgresql* with nHibernate attributes? This is what we are using now:
>
> private int id;
> [Id(0, Column = “id”, Name = “Id”)]
> [Generator(1, Class = “native”)]
> public virtual int ID { get { return id; } }
>
>
> Last question is related to *ENUM* types - how can we make nHibernate to 
> generate requests like *CREATE TYPE* type_enum AS ENUM (‘A’,‘B’); and 
> using them in the *INSERT* / *UPDATE* sql requests?
>
>
> Thank you
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nhibernate-development+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to