-->
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: How can I delete a row in List?
PostPosted: Fri Jun 01, 2007 1:30 pm 
Newbie

Joined: Mon May 14, 2007 8:23 am
Posts: 3
I'm studying hibernate for next project.

As I wrote a few test codes I faced some problem.

In my test project (named Blog)

there is an article and some comments

article has rows(id, writer, content)

and there are comments for some article

Comments -> (a_id, id, writer, comment)
a_id is a key which direct to article
id is and id value of Comments

I can write article and add comment

but I cannot delete any comment from an article.

when I try to delete a comment,
there's an SQL like
"UPDATE comment set a_id=null, id=null where a_id=x, id=y"

but the fields(a_id and id) cannot be null....

how can i correct this problem?

P.S : Is there any sample projects which are good to study hibernate?


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.