Skip to content

NH-3426 - Wrong result when converting Guid to string #1151

Closed
@nhibernate-bot

Description

@nhibernate-bot

Oskar Berggren created an issue — 18th March 2013, 9:06:30:

Having a sqlite database where a column contains guids stored as blobs.

In the select clause of a linq query, ToString() is applied on the Guid property of the model object. NHibernate will forward this to the SQL as

     select
        cast(Id as char) as col_2_0_ 

Unfortunately, the resulting strings won't contain the intended standard string representations of GUID, but instead the raw bytes directly interpreted as characters, which is something completely different.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions