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

Closed
jmvivo opened this Issue Dec 4, 2014 · 8 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
jmvivo commented Dec 4, 2014

Provided a pull request to fix it

@Shredder121
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.

@jmvivo
jmvivo commented Dec 5, 2014

Thank you. Testing.... ;-)

@jmvivo
jmvivo commented Dec 5, 2014

With your changes works as expected. 👍

@Shredder121
Member

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
jmvivo commented Dec 9, 2014

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

@Shredder121
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.

@jmvivo
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