mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
Change clone() to copy all state
This commit is contained in:
parent
3f2ca5ccad
commit
9c093a4d61
@ -357,7 +357,7 @@ public abstract class AbstractJPAQuery<Q extends AbstractJPAQuery<Q>> extends JP
|
||||
|
||||
/**
|
||||
* Clone the state of this query to a new instance with the given EntityManager
|
||||
* using the specified templates
|
||||
* and the specified templates
|
||||
*
|
||||
* @param entityManager
|
||||
* @param templates
|
||||
@ -371,12 +371,7 @@ public abstract class AbstractJPAQuery<Q extends AbstractJPAQuery<Q>> extends JP
|
||||
* @return
|
||||
*/
|
||||
public Q clone() {
|
||||
JPQLTemplates existingTemplates = getTemplates();
|
||||
if (existingTemplates != null) {
|
||||
return clone(entityManager, existingTemplates);
|
||||
}else {
|
||||
return clone(entityManager);
|
||||
}
|
||||
return clone(entityManager, getTemplates());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user