nhibernate - Preserve leading zeros when mapping NUMERIC(5,0) to string -


Hope this is a simple question I have a legacy DB2 database on AS / 400, where zones like zip codes Is deposited in the form of NUMERIC. When they mapped to NHibernate, they consider it an integer and leading zeros are lost. Usually I will use

from the security table (field)

to preserve leading zero, but I understand that if I Formulating the formula to correct the formatting, I force the field to be read only.

What is the correct way to type NUMERIC type (with its leading digit) in a string type and again?

You are trying to deal it at the wrong level.

Leading zero is a performance concern; Just use "00000" as your format string.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -