Skip to content

Invalid parameter conversion for enums #2439

Closed
@emejibka

Description

@emejibka

Test case
https://github.com/emejibka/nhibernate-fetch-bug/blob/master/TestClass.cs

Insert
INSERT INTO "Product" (Category, Customer_id) VALUES (@p0, @p1); select last_insert_rowid();@p0 = 'SomeCategory' [Type: String (0:0:0)], @p1 = 1 [Type: Int64 (0:0:0)]

Select with fetch
select cast(count(*) as INTEGER) as col_0_0_ from "Product" product0_ where product0_.Category=@p0;@p0 = 1 [Type: Int32 (0:0:0)]

Select without fetch
select cast(count(*) as INTEGER) as col_0_0_ from "Product" product0_ where product0_.Category=@p0;@p0 = 'SomeCategory' [Type: String (0:0:0)]

Why the text enum value is replaced with an integer?

It happens with NH 5.3. 5.2.7 work without issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions