mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
In version 13.22 if the entity definition is in a different package, the generated query bean cannot resolve the symbol erro
This commit is contained in:
+2
-1
@@ -362,7 +362,8 @@ class ProcessingContext implements Constants {
|
||||
private PropertyType createPropertyTypeAssoc(String fullName) {
|
||||
String[] split = Split.split(fullName);
|
||||
String propertyName = "Q" + split[1] + ".Assoc";
|
||||
return new PropertyTypeAssoc(propertyName);
|
||||
String importName = split[0] + ".query.Q" + split[1];
|
||||
return new PropertyTypeAssoc(propertyName, importName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-2
@@ -7,13 +7,17 @@ import java.util.Set;
|
||||
*/
|
||||
class PropertyTypeAssoc extends PropertyType {
|
||||
|
||||
private final String importName;
|
||||
|
||||
/**
|
||||
* Construct given the associated bean type name and package.
|
||||
*
|
||||
* @param qAssocTypeName the associated bean type name.
|
||||
* @param importName the import for the Assoc bean.
|
||||
*/
|
||||
PropertyTypeAssoc(String qAssocTypeName) {
|
||||
PropertyTypeAssoc(String qAssocTypeName, String importName) {
|
||||
super(qAssocTypeName);
|
||||
this.importName = importName;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -21,7 +25,7 @@ class PropertyTypeAssoc extends PropertyType {
|
||||
*/
|
||||
@Override
|
||||
void addImports(Set<String> allImports) {
|
||||
// do nothing
|
||||
allImports.add(importName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user