[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-torque-user
Subject:    Antw: beginner Question on Object.save() method.
From:       "Alvin Antony" <Alvin.Antony () internet ! lmu ! de>
Date:       2003-02-27 10:22:19
[Download RAW message or body]

Hi all,

   May be this is a silly Question but I didn't find any document on web
on this. here it is again.

I have a kind of database design, I have Author table, a book table and
a AuthorBook table and there is an n-n relationship with table Author
and Book and each relationship there is a raw on the AuthorBook table.

I am using Struts frame on my project, and the users can login and enter
new books or add existing books to his reference. for this I am setting
the book object on my ActionForm instance. 
the saving process should be like this, the book object should be saved
into the database only if setting the entry  on table AuthorBook is
successful. 

at the moment,I am doing like this.
on action class
actionForm.setBook(new Book())
........
user adds the columns of book object by webinterface
........
.......
on the action class
AuthorBook= new authorBook();
actionForm.getBook().addAuthorBook(authorBook)
Author=(Author)request.getSession().getAttribute("Author");
author.addAuthorBook(authorBook);
author.save();

is this makes sense or I am missing something

thanks in advance,
Alvin










Alvin K. Antony
Ludwig-Maximilians-Universität München
Internet und Virtuelle Hochschule
Softwareentwicklung
Oettingenstraße 67
80538 München
Germany
-------------------------------------------
Phone: +49 (0)89 2102-5979
Fax: +49 (0)89 2102-5980
Mobile: +49 (0)175 9401175
E-Mail: aantony@lmu.de

Web: http://www.lmu.de/internet/


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic