views:

297

answers:

1

I have a view that flattens out a hierachy of 4 tables to display as a report. within the view it contains the primary keys (Guid) of each of the tables along with some display data.

The problem is that the the guids are being returned as varbinary(16) instead of binary(16) and as a result nhibernate throws an error. This would appear to be the same to me but maybe I am missing something.

Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

I have tried adding Respect Binary Flags=true; to the config string all that seems to do is affect whether the regular classes work or not.

This one hase me stumped. I am about to revert the primary keys to Integers as a last resort.

A: 

This is a bug in Mysql .net connector check this bug report for more details http://bugs.mysql.com/bug.php?id=52747

UPDATE: After version 6.1.1 you should add "old guids=true" to your connection string whenever you use BINARY(16) as your storage type. Else you should use CHAR(36)

jalchr
Jalchr - was it ever resolved? there doesn't seem to be a resolution to it. unless i missed something.
Nathan Fisher