If you mapped it as GUID NHibernate will convert it to the Guid .Net
type, and you are limited to the string formats that class will allow.
If you've mapped it as a string, NHibernate will not convert it to
Guid. If you've mapped it as a string or using a custom type and
something still tries to convert it to the Guid type, it would mean
you've made a mistake somewhere. More code is required to understand
where exactly.

To handle null values, the property must be typed as nullable Guid.

/Oskar


2015-02-05 20:26 GMT+01:00  <[email protected]>:
> Hello! It seems nhibernate cannot handle empty strings or bad data in
> varchar(36) field in a MySql database.. even if the mapping for the field is
> string type and not guid.. something happens at DoList time that sees the
> field is varchar36 and tries to parse it as a guid and fails on empty
> strings.. I understand fixing the data would be the best way, but there are
> many tables with this problem. I would prefer to be able to fix it after
> reading it from Nhibernate
>
> Please see my post at stack overflow for more info:
> http://stackoverflow.com/q/28330368/4530203
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to