ok, not much details. Let me add some.
Everytime, I insert a record, I want the sequence number to increment
by one. For example:
count( entities with invoiceId) + 1

With constraints that the combination should be unique.
My question is, does something like this exist or I have to implement
a custom generator ?


On Sat, Mar 10, 2012 at 12:33 AM, Mansour Al Akeel
<mansour.alak...@gmail.com> wrote:
> I have an entity InvoiceItem. I need to be able to generate the table as in:
>
> invoiceId    seq          .... more fields
> 1              1
> 1              2
> 1              3
> 2              1
> 2              2
> 2              3
> 2              4
>
> Is there a way to do it in JPA 2.0 ?

Reply via email to