@@ -1404,6 +1404,12 @@ public static void bindCollection(Element node, Collection collection, String cl
1404
1404
if ( nodeName == null ) nodeName = node .attributeValue ( "name" );
1405
1405
collection .setNodeName ( nodeName );
1406
1406
String embed = node .attributeValue ( "embed-xml" );
1407
+ // sometimes embed is set to the default value when not specified in the mapping,
1408
+ // so can't seem to determine if an attribute was explicitly set;
1409
+ // log a warning if embed has a value different from the default.
1410
+ if ( !StringHelper .isEmpty ( embed ) && !"true" .equals ( embed ) ) {
1411
+ LOG .embedXmlAttributesNoLongerSupported ();
1412
+ }
1407
1413
collection .setEmbedded ( embed ==null || "true" .equals (embed ) );
1408
1414
1409
1415
@@ -1627,6 +1633,12 @@ public static void bindManyToOne(Element node, ManyToOne manyToOne, String path,
1627
1633
manyToOne .setReferencedEntityName ( getEntityName ( node , mappings ) );
1628
1634
1629
1635
String embed = node .attributeValue ( "embed-xml" );
1636
+ // sometimes embed is set to the default value when not specified in the mapping,
1637
+ // so can't seem to determine if an attribute was explicitly set;
1638
+ // log a warning if embed has a value different from the default.
1639
+ if ( !StringHelper .isEmpty ( embed ) && !"true" .equals ( embed ) ) {
1640
+ LOG .embedXmlAttributesNoLongerSupported ();
1641
+ }
1630
1642
manyToOne .setEmbedded ( embed == null || "true" .equals ( embed ) );
1631
1643
1632
1644
String notFound = node .attributeValue ( "not-found" );
@@ -1702,7 +1714,14 @@ public static void bindOneToOne(Element node, OneToOne oneToOne, String path, bo
1702
1714
initOuterJoinFetchSetting ( node , oneToOne );
1703
1715
initLaziness ( node , oneToOne , mappings , true );
1704
1716
1705
- oneToOne .setEmbedded ( "true" .equals ( node .attributeValue ( "embed-xml" ) ) );
1717
+ String embed = node .attributeValue ( "embed-xml" );
1718
+ // sometimes embed is set to the default value when not specified in the mapping,
1719
+ // so can't seem to determine if an attribute was explicitly set;
1720
+ // log a warning if embed has a value different from the default.
1721
+ if ( !StringHelper .isEmpty ( embed ) && !"true" .equals ( embed ) ) {
1722
+ LOG .embedXmlAttributesNoLongerSupported ();
1723
+ }
1724
+ oneToOne .setEmbedded ( "true" .equals ( embed ) );
1706
1725
1707
1726
Attribute fkNode = node .attribute ( "foreign-key" );
1708
1727
if ( fkNode != null ) oneToOne .setForeignKeyName ( fkNode .getValue () );
@@ -1730,6 +1749,12 @@ public static void bindOneToMany(Element node, OneToMany oneToMany, Mappings map
1730
1749
oneToMany .setReferencedEntityName ( getEntityName ( node , mappings ) );
1731
1750
1732
1751
String embed = node .attributeValue ( "embed-xml" );
1752
+ // sometimes embed is set to the default value when not specified in the mapping,
1753
+ // so can't seem to determine if an attribute was explicitly set;
1754
+ // log a warning if embed has a value different from the default.
1755
+ if ( !StringHelper .isEmpty ( embed ) && !"true" .equals ( embed ) ) {
1756
+ LOG .embedXmlAttributesNoLongerSupported ();
1757
+ }
1733
1758
oneToMany .setEmbedded ( embed == null || "true" .equals ( embed ) );
1734
1759
1735
1760
String notFound = node .attributeValue ( "not-found" );
0 commit comments