Skip to content

NH-2611 - Allow injectable/inheritance of Linq query provider #313

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

Merged
merged 1 commit into from
Feb 22, 2015
Merged

NH-2611 - Allow injectable/inheritance of Linq query provider #313

merged 1 commit into from
Feb 22, 2015

Conversation

rjperes
Copy link
Member

@rjperes rjperes commented Sep 1, 2014

@hazzik
Copy link
Member

hazzik commented Sep 23, 2014

@rjperes it seems that you've forgot to set default linq provider.

@rjperes
Copy link
Member Author

rjperes commented Sep 23, 2014

Hmm, no, that's what this does:

string className = PropertiesHelper.GetString(
Environment.QueryLinqProvider, properties, typeof(DefaultQueryProvider).FullName);

Will have a look.

@rjperes
Copy link
Member Author

rjperes commented Sep 23, 2014

The problem does not happen in my machine, all tests are green. Any thoughts?

@hazzik
Copy link
Member

hazzik commented Sep 23, 2014

@rjperes I saw your original message ;)

@rjperes
Copy link
Member Author

rjperes commented Sep 24, 2014

@hazzik :-)
And do you have any ideas as to why the tests are failing?

@oskarb
Copy link
Member

oskarb commented Sep 25, 2014

The error message on the build server is
[18:34:52] : [exec] 1) SetUp Error : NHibernate.Test.Linq.LinqReadonlyTestsContext
[18:34:52] : [exec] SetUp : System.Data.SqlClient.SqlException : There is insufficient system memory in resource pool 'internal' to run this query.

Might have been temporary. I've started the same build again.

@hazzik hazzik added this to the 5.0.0 milestone Sep 26, 2014
@rjperes
Copy link
Member Author

rjperes commented Oct 10, 2014

Can you update the fix version in Jira?

@hazzik hazzik modified the milestones: 4.1.0, 5.0.0 Oct 10, 2014
@hazzik hazzik changed the title NH-2890 NH-2611 Oct 10, 2014
public void NH2890Standard()
{
var cfg = new Configuration();
cfg.Configure("TestEnbeddedConfig.cfg.xml")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the file name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but not mine! :-) I used a file that was already there

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@rjperes
Copy link
Member Author

rjperes commented Oct 11, 2014

OK, added a factory method
I was wondering: any benefit in caching the query provider per session? Maybe more trouble than it's worth (instances piling up in the cache, etc)

@hazzik
Copy link
Member

hazzik commented Oct 11, 2014

@rjperes, can you please do following

$git fetch --all --prune
$git checkout NH-2890
$git reset 3765630 --hard


namespace NHibernate.Linq
{
public static class QueryProviderFactory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internal, please

@rjperes
Copy link
Member Author

rjperes commented Oct 11, 2014

Well, if we are to have a plugable mechanism, why not allow developers from inheriting from existing classes and change its behavior? For that, we need virtual methods, right? I mean, most people won't create a brand new query provider, but instead inherit from the existing one.
As for the internal visibility, ok, will update the code

@hazzik
Copy link
Member

hazzik commented Oct 11, 2014

Ok, right..

@hazzik hazzik changed the title NH-2611 NH-2611 - Allow injectable/inheritance of Linq query provider Dec 2, 2014
@hazzik
Copy link
Member

hazzik commented Dec 4, 2014

@rjperes can you please do following?

git fetch --all --prune

@rjperes
Copy link
Member Author

rjperes commented Dec 9, 2014

Just did

@hazzik hazzik merged commit 6b1c757 into nhibernate:master Feb 22, 2015
@hazzik hazzik deleted the NH-2890 branch February 22, 2015 22:00
@hazzik
Copy link
Member

hazzik commented Feb 24, 2015

@rjperes could you please document this new configuration setting?

@rjperes
Copy link
Member Author

rjperes commented Feb 24, 2015

Ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants