Skip to content

LINQ: unable to cast object of type 'NHibernate.Action.DelayedPostInsertIdentifier' to type 'System.IConvertible #3041

Open
@fabiomaulo

Description

@fabiomaulo

var alreadyStored = await session.Query<HistoricoMyEntity>().Where(h => h.User == user).ToListAsync();
The user, in this case, is an entity previously persisted via session.Persist in the same session.

The exception is :
Unable to cast object of type 'NHibernate.Action.DelayedPostInsertIdentifier' to type 'System.IConvertible'

Expected:
NH should recognize the entity and the DelayedPostInsertIdentifier, retrieve the ID and use it in the generated SQL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions