Created
June 23, 2016 08:48
-
-
Save gsmet/a5f9a6b731936fc33eea8d7f673e226e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/source/spi/AttributePath.java b/hibernate-core/src/main/java/org/hibernate/boot/model/source/spi/AttributePath.java | |
index 0005f48..509b22f 100644 | |
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/source/spi/AttributePath.java | |
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/source/spi/AttributePath.java | |
@@ -16,6 +16,8 @@ | |
public class AttributePath extends AbstractAttributeKey { | |
public static final char DELIMITER = '.'; | |
+ private boolean elementCollection = false; | |
+ | |
public AttributePath() { | |
super(); | |
} | |
@@ -27,6 +29,12 @@ | |
@Override | |
public AttributePath append(String property) { | |
+ if ( "collection&&element".equals( property ) ) { | |
+ // HHH-6005 we remove the collection&&element part and we mark the AttributePath as being an element | |
+ // collection. | |
+ setElementCollection( true ); | |
+ return this; | |
+ } | |
return new AttributePath( this, property ); | |
} | |
@@ -35,8 +43,17 @@ | |
return (AttributePath) super.getParent(); | |
} | |
- public AttributePath(AttributePath parent, String property) { | |
+ public boolean isElementCollection() { | |
+ return elementCollection; | |
+ } | |
+ | |
+ public void setElementCollection(boolean elementCollection) { | |
+ this.elementCollection = elementCollection; | |
+ } | |
+ | |
+ protected AttributePath(AttributePath parent, String property) { | |
super( parent, property ); | |
+ this.elementCollection = parent.elementCollection; | |
} | |
public static AttributePath parse(String path) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment