Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NH-2978 - LINQ: Queries for unmapped entity types return empty result set #1106

Closed
nhibernate-bot opened this issue Oct 12, 2017 · 0 comments · Fixed by #2504
Closed

NH-2978 - LINQ: Queries for unmapped entity types return empty result set #1106

nhibernate-bot opened this issue Oct 12, 2017 · 0 comments · Fixed by #2504

Comments

@nhibernate-bot
Copy link
Collaborator

nhibernate-bot commented Oct 12, 2017

James Nail created an issue — 16th December 2011, 22:52:56:

in NH 3.2.0, if you do a LINQ query for an unmapped entity type it returns an empty result set instead of throwing an exception.

mySession.Query<MyUnmappedEntityType>().ToList();
mySession.Query<MyUnmappedEntityType>().Delete();

Since the HQL query implementation throws an exception in this scenario (ex, NHibernate.Hql.Ast.ANTLR.QuerySyntaxException --> "MyUnmappedEntityType is not mapped"), I would expect the LINQ provider to have the same behavior (it should throw an exception)


Anton Chelnokov added a comment — 2nd September 2015, 17:43:34:

4 years...

hazzik pushed a commit that referenced this issue Sep 8, 2020
@hazzik hazzik added this to the next minor milestone Sep 8, 2020
BenedekFarkas added a commit to OrchardCMS/Orchard that referenced this issue Dec 6, 2024
* Upgrading NHibernate to 5.5.2

* Adapting SchemaCommandGenerator to obsolete NHibernate code

* Adapting unit tests to NHibernate breaking change

nhibernate/nhibernate-core#1106
nhibernate/nhibernate-core#1095

* Updating ModuleRootWebConfig.txt codegen template according to the new Newtonsoft.Json and NHibernate version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants