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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Show comment
Hide comment
@jmvivo

jmvivo Dec 4, 2014

Provided a pull request to fix it

jmvivo commented Dec 4, 2014

Provided a pull request to fix it

@Shredder121

This comment has been minimized.

Show comment
Hide comment
@Shredder121

Shredder121 Dec 4, 2014

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@jmvivo

jmvivo Dec 5, 2014

Thank you. Testing.... ;-)

jmvivo commented Dec 5, 2014

Thank you. Testing.... ;-)

@jmvivo

This comment has been minimized.

Show comment
Hide comment
@jmvivo

jmvivo Dec 5, 2014

With your changes works as expected. 👍

jmvivo commented Dec 5, 2014

With your changes works as expected. 👍

@Shredder121

This comment has been minimized.

Show comment
Hide comment
@Shredder121

Shredder121 Dec 5, 2014

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@jmvivo

jmvivo Dec 9, 2014

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

jmvivo commented Dec 9, 2014

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

@Shredder121

This comment has been minimized.

Show comment
Hide comment
@Shredder121

Shredder121 Dec 9, 2014

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@jmvivo

jmvivo Dec 9, 2014

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

jmvivo commented Dec 9, 2014

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

@timowest timowest closed this in #1073 Dec 19, 2014

@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