-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Natural identifier in component and multi natural-id.
PostPosted: Thu Feb 13, 2014 11:24 pm 
Newbie

Joined: Wed Dec 21, 2011 12:56 pm
Posts: 3
1. Support for natural-id within component

With 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 identifiers

Hibernate 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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.