Joined: Tue Feb 17, 2009 11:50 am Posts: 2
|
Hello,
I'm using java 1.5 with annotation
I doubt a Note and a relationship which is so Nota_Item
[code]
Today is thus
Class Nota_item (
@ Id
@ GeneratedValue (strategy = GenerationType.AUTO)
@ Column ( "item_nota)
private int id
@ ManytoOne
private Note note;
)
the object Nota_Item
Note Item_Nota
======= ===
1 5
2 5
3 5
------------------------------------
4 6
5 6
6 6
-------------------------------------
7 10
8 10
[/ code]
I wanted it to be so
start of each new note to the item of note with the number 1
which has the notation used would have to create another field to control
and leave the id as it is ??????
which notes how to use ....
[code]
as it should be
Note Item_Nota
======= ===
1 5
2 5
3 5
------------------------------------
1 6
2 6
3 6
-------------------------------------
1 10
2 10
[/ code]
|
|