On Thu, 23 Nov 2006, John Siracusa wrote:
> Try calling save() and not update().
Perfect, thanks!
Guess my problem is that I have been using Class::DBI a lot and
and update() in Class::DBI is the equivalent of save() in Rose.
You should add a
use Rose::DB::Object qw(:former_class_dbi_programmer);
mode which lets all update()s blow up with a warning message :).
-- Mike
Mike Schilli
[EMAIL PROTECTED]
> If you look at the docs for the
> "get_set_on_save" method made for the "vendor" foreign key, you'll see this:
>
> http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/MakeMethods/Ge
> neric.pm#object_by_key
>
> ---
> ...
> get_set_on_save
>
> Creates a method that will attempt to create and load a
> Rose::DB::Object-derived object based on a primary key formed from
> attributes of the current object, and save the object when the "parent"
> object is saved.
> ---
>
> In the HTML docs, the the "save" portion of the word "saved" is a link to
> the save() method. IOW, the stuff described happens only when save() is
> called. Calling update() will not trigger it.
>
> The docs are not very emphatic on this point, and it's probably because
> update() and insert() were previously internal, undocumented methods. When
> I made them public, I should have added clarification regarding the newly
> multiple ways to save an object. I'll make a note to update the docs in the
> next release.
>
> -John
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Rose-db-object mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rose-db-object
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object