Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

ajtaylor (1283)

ajtaylor
  (email not shown publicly)
http://www.drewtaylor.com/

Journal of ajtaylor (1283)

Wednesday December 18, 2002
06:12 PM

Class::DBI rocks!

[ #9536 ]
I just started using Class::DBI on a project at $work and it is by far the coolest thing since sliced bread! When you can write a whole data model class in a half dozen lines of code, you better realize you're onto a good thing. It let me beat my own estimate (sometimes notoriously bad even with padding!) for Milestone 1 on this project by 2 days! Many thanks go out to Tony Bowden and all the others who have hacked on Class::DBI.

That said, I'm having a problem where I can't use it like I want. :-) I've gotten a workaround, but it's a total hack. Thus deserving of a good solution. My previous data models could handle having an id of 0 passed to them. It meant, create an empty object. Unfortunately, I can't use
Class->retrieve(0); since I get undef in return. How can I work around this? Would calling create() with a minimal hashref and not calling commit() do the trick? ie. not write a database entry? Any ideas welcome. And yes, I posted to the mailing list but have not yet gotten the answer I want. :-)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.