1. Support for natural-id within componentWith current natural-id declaration, needing property definition within "<natural-id>" block it is also not possible to define the natural identifier within a component. I have an entity with a component where natural identifier properties must be mapped within the component, which is not possible.
Table Item[*]gtin - global trade item number
[*]barcode - original barcode
[*]barcodeType - type of barcode
[/list]
The above three barcode properties are mapped in a component.
Code:
public class Item
{
private BarcodeData barcodeData;
// ...
}
public class BarcodeData
{
private String gtin;
private String barcode;
private String barcodeType;
}
2. Support multiple natural identifiersHibernate should support multiple natural-ids. Depending on the business logic tables can have multiple natural identifiers.
These three fields by common sense form two natural identifiers.
[list=]
[*]gtin
[*]barcode, barcodeType
[/list]
There are also other scenarios where multiple natural identifiers could be applied.