mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
#710 - Behavior change - query with invalid fetch path (without properties) now throws PersistenceException
This commit is contained in:
1 parent
362ceea79b
commit
75a2633590
4 files changed
+33
-12
No files matched your search
@@ -1,18 +1,17 @@
|
||||
package com.avaje.ebeaninternal.server.query;
|
||||
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
|
||||
import com.avaje.ebeaninternal.server.el.ElPropertyDeploy;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
|
||||
import com.avaje.ebeaninternal.server.el.ElPropertyDeploy;
|
||||
|
||||
/**
|
||||
* Special Map of the logical property joins to table alias.
|
||||
*
|
||||
* @author rbygrave
|
||||
*/
|
||||
public class SqlTreeAlias {
|
||||
|
||||
@@ -61,7 +60,10 @@ public class SqlTreeAlias {
|
||||
if (propJoins != null) {
|
||||
for (String propJoin : propJoins) {
|
||||
ElPropertyDeploy elProp = desc.getElPropertyDeploy(propJoin);
|
||||
if (elProp != null && elProp.getBeanProperty().isEmbedded()) {
|
||||
if (elProp == null) {
|
||||
throw new PersistenceException("Invalid path " + propJoin + " from " + desc.getFullName());
|
||||
|
||||
} else if (elProp.getBeanProperty().isEmbedded()) {
|
||||
addEmbeddedPropertyJoin(propJoin);
|
||||
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user