[CDBI] Transactions between HTTP requests?
jc5826 at gmail.com
Wed Mar 8 20:50:54 GMT 2006
On 3/8/06, Ryan Tate <lists at ryantate.com> wrote:
> I have had some success creating versions within an existing table. I do
> my $Package = __PACKAGE__;
> __PACKAGE__->has_a( version_of => $Package );
> __PACKAGE__->has_many( versions => $Package );
> All data lives in one place with one schema, which simplifies life.
> version_of always refers to the base version, never to another
> version, so you can delete versions at will. This provides a handy
> path to undo-ing UPDATEs.
Not sure I completely understand. Does this mean you repeat the
primary key in the same table? Do you have a sample?
It does sound like you may benefit greatly from having a database that
supports views given this type of implementation.
More information about the ClassDBI