-->
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: JPA / Hibernate using doubt as a result of starting at 1 new
PostPosted: Wed Feb 18, 2009 11:57 am 
Newbie

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]


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.