| This is based on an additional problem notated in
HHH-11841 Open . Lets assume the following example:
public class Category {
private Map<Item, Value> categoryItem;
}
This is mapped using
<map name="categoryItem" table="category_item">
<key column="category_id" not-null="true" />
<map-key-many-to-many column="item_id" class="Item" />
<element type="ValueType">
<column name="number" not-null="false" />
<column name="text" not-null="false" />
</element>
</map>
where ValueType is a CompositeUserType implementation. When ORM generates this mapping, only the owner Category and Item primary keys are used to generate the association table's primary key constraint; however, Envers generates its audit table primary key including the number and text columns, which is problematic for storing nullable properties in this use case. There is also predicates which the audit reader adds when querying such a mapping that doesn't use property is null but instead uses property = null. |