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

JPAQuery.clone: new instance doesn't get original instance templates #1071

Closed
jmvivo opened this issue Dec 4, 2014 · 8 comments
Closed

JPAQuery.clone: new instance doesn't get original instance templates #1071

jmvivo opened this issue Dec 4, 2014 · 8 comments
Labels
bug
Milestone

Comments

@jmvivo
Copy link

@jmvivo jmvivo commented Dec 4, 2014

I create a JPAQuery with custom templates:

JPAQuery query = new JPAQuery(em,myTemplates);

but if I clone it with

JPAQuery clonedQuery = query.clone();

clonedQuery is created with the standard JPQLTemplates.

@jmvivo
Copy link
Author

@jmvivo jmvivo commented Dec 4, 2014

Provided a pull request to fix it

@Shredder121
Copy link
Member

@Shredder121 Shredder121 commented Dec 4, 2014

As I said in the pull request, clone is also used to attach a fresh, empty JPAQuery to an EntityManager.

This means that when you don't set templates yourself, syntax errors would occur, since it doesn't correctly attach the query anymore.

I'll provide another pull request, which should respect your custom templates.

@jmvivo
Copy link
Author

@jmvivo jmvivo commented Dec 5, 2014

Thank you. Testing.... ;-)

@jmvivo
Copy link
Author

@jmvivo jmvivo commented Dec 5, 2014

With your changes works as expected. 👍

@Shredder121
Copy link
Member

@Shredder121 Shredder121 commented Dec 5, 2014

That is good news.
And thank you for the report and suggestion!

@Shredder121 Shredder121 added the bug label Dec 5, 2014
@timowest timowest added this to the 4.0.0 milestone Dec 7, 2014
@jmvivo
Copy link
Author

@jmvivo jmvivo commented Dec 9, 2014

You're welcome.
Just one question... is there any schedule for 4.0 release?
Thanks again.

@Shredder121
Copy link
Member

@Shredder121 Shredder121 commented Dec 9, 2014

The milestone page gives you a general idea of the release schedule.
Keep in mind that not all release dates are final and are subject to change(we moved 4.0 around, with additional maintenance releases).
I hope this answers your question.

@jmvivo
Copy link
Author

@jmvivo jmvivo commented Dec 9, 2014

Yes, thank you.
I tried to get it from roadmap wiki page but link is broken.

@timowest timowest removed the progress label Mar 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.