Tobias,

Tobias Kremer wrote:
> Basically I'm overriding the insert, update and delete methods in my 
> component.
> Unfortunately PK::Auto's insert method first calls the other components in the
> chain (as far as i understand this whole overriding-next-c3-fu) and then
> retrieves a new primary key if none is already given. This leads to the
> problem that my component needs a primary key to make a reference in the
> audit trail/history table to the modified record but it's not there because
> PK::Auto delays the fetching of a new primary key value until all other
> components were run(?)
>   
Having done something similar, be aware that your "reference" to the id 
should be an actual foreign key. Try to delete a row and you'll see what 
i mean. :)

-Brian

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to