THANK YOU, that's all I need to know.<br><br><b><i>"Hermida, Leandro" <Leandro.Hermida@fmi.ch></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>Hello,<br><br>I am no DBIx::Class expert but I think one way of doing it is first<br>using the primary key or a unique constraint of the table Book to<br>find the object you want and then update it. Something like<br>this:<br><br>my $book = $c->model('MyApp::Book')->find($book_pk_id);<br>$book->title($new_title);<br>$book->rating($new_rating);<br>$book->update;<br><br><br>Leandro<br><br><br>________________________________<br><br> From: Will Smith [mailto:willbelair@yahoo.com] <br> Sent: Wednesday, December 06, 2006 21:53<br> To: catalyst<br> Subject: [Catalyst] html::widget<br> <br> <br> Hi,<br> It's pretty neat to use html::widget to create/validate html<br>form. Problem is I need to create a lot of customized html forms
that<br>could not done easily with html::widget. I want to simply do my own html<br>form and use a normal action to update the record.<br> I tried to use somehing like:<br> my $book = $c->model('myapp::Book')->update({<br> title => $title,<br> rating => $rating,<br> });<br> but of course, it updates the whole table, not only the wanted<br>record, because I do not put in the condition "where".<br> I used to use : update_from_form in older version of catalyst.<br> Could someone please show me the syntax to do the update, either<br>adding condition to the above method (which I think there is a simple<br>way), or using update_from_form<br> something like the old timer:<br> <br> $c->for( optional => [ myapp::M::CDBI::books->columns ] );<br> ..<br> myapp::M::CDBI::books->retrieve($id)->update_from_form(<br>$c->form);<br> <br> <br> Thank you<br>
<br><br>_______________________________________________<br>List: Catalyst@lists.rawmode.org<br>Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/<br>Dev site: http://dev.catalyst.perl.org/<br></blockquote><br><p> 
<hr size=1>Need a quick answer? Get one in minutes from people who know. Ask your question on
<a href="http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx">Yahoo! Answers</a>.