Skip to content

NH-2894 - SetProjection( Projections.RowCount ) with SetLockMode( LockMode.NoLock ) will raise exception #1101

Open
@nhibernate-bot

Description

@nhibernate-bot

Alex Uslontsev created an issue — 19th September 2011, 19:22:51:

Pseudocode example

criterial
.SetProjection( Projections.RowCount )
.SetLockMode( LockMode.NoLock )
.ToList()

will raise "object reference not set to an instance of an object" exception.

The problem is in the ApplyLocks method in the following line

string[] drivingSqlAliases = Aliases;
for (int i = 0; i < drivingSqlAliases.Length; i<ins></ins>)

In my case drivingSqlAliases is null, and accessing to drivingSqlAliases.Length raises this exception


Alexander Zaytsev added a comment — 23rd January 2013, 3:34:25:

Could someone provide a test case?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions