Felipe Oriani
2017-12-07 16:08:38 UTC
Hi,
We have a database which we store the currencies of the world. We have a
column called Symbol which the datatype is VARCHAR(20). It is a Oracle
database and we are mapping in a string property with Fluent NHibernate
like this:
Map(x => x.Symbol).Not.Nullable();
In this column we store the symbol for the currency. For sample: U$
(dolar), £ (pounds), R$ (real - brazil), ⬠(euro).
The problem is with the ⬠symbol for Euro Currency, when we try it,
nhibernate save on the database the ¿ char, instead of â¬. We have tried to
map the column using AnsiString, for sample:
Map(x => x.Symbol).CustomType("AnsiString").Not.Nullable();
but it does not work as expected.
If we hit a insert sql statement on the database it works as expected but
nhibernate cannot read it and give the ¿ char.
How can we solve it?
Thank you.
--
______________________________________
Felipe B Oriani
***@gmail.com
We have a database which we store the currencies of the world. We have a
column called Symbol which the datatype is VARCHAR(20). It is a Oracle
database and we are mapping in a string property with Fluent NHibernate
like this:
Map(x => x.Symbol).Not.Nullable();
In this column we store the symbol for the currency. For sample: U$
(dolar), £ (pounds), R$ (real - brazil), ⬠(euro).
The problem is with the ⬠symbol for Euro Currency, when we try it,
nhibernate save on the database the ¿ char, instead of â¬. We have tried to
map the column using AnsiString, for sample:
Map(x => x.Symbol).CustomType("AnsiString").Not.Nullable();
but it does not work as expected.
If we hit a insert sql statement on the database it works as expected but
nhibernate cannot read it and give the ¿ char.
How can we solve it?
Thank you.
--
______________________________________
Felipe B Oriani
***@gmail.com
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.