[RDBO] Unsetting an enum value

2007-06-25 Thread Ovid
Hi all, We have a field in a table with an enum comprised of the values 'p', 's', and 't'. It's allowed to be NULL. In my object, I've defined it as: priority => { type => 'enum', values => [qw/ p s t /], }, In my tests, I have the following snippet: $ip->priority('p');

Re: [RDBO] Unsetting an enum value

2007-06-25 Thread John Siracusa
On 6/25/07, Ovid <[EMAIL PROTECTED]> wrote: > In other words, trying to set the enum to a null value fails. I've tried > adding 'undef' the the column definition in my class, but this also has no > effect. What am I missing? A bug fix, now in SVN :) -John --

[RDBO] Two RDBO hierarchies interfering

2007-06-25 Thread Adrian Howard
Anybody encountered something like this? 1) I have a single process (mod_perl) with two different RDBO hierarchies connecting to two different databases from the same MySQL 5 server - each using their own IMA::DB subclasses 2) The two databases both have a table with the same name 3) This see

Re: [RDBO] Two RDBO hierarchies interfering

2007-06-25 Thread John Siracusa
On 6/25/07, Adrian Howard <[EMAIL PROTECTED]> wrote: > 1) I have a single process (mod_perl) with two different RDBO > hierarchies connecting to two different databases from the same MySQL > 5 server - each using their own IMA::DB subclasses Er, IMA::DB? > 2) The two databases both have a table

Re: [RDBO] Two RDBO hierarchies interfering

2007-06-25 Thread Adrian Howard
On 25 Jun 2007, at 16:33, John Siracusa wrote: > On 6/25/07, Adrian Howard <[EMAIL PROTECTED]> wrote: >> 1) I have a single process (mod_perl) with two different RDBO >> hierarchies connecting to two different databases from the same MySQL >> 5 server - each using their own IMA::DB subclasses >

Re: [RDBO] Two RDBO hierarchies interfering

2007-06-25 Thread Ovid
- Original Message From: Adrian Howard <[EMAIL PROTECTED]> >> 2) The two databases both have a table with the same name >> 3) This seems to be mucking up RDBO::Loader setting up the many 2 >> many relationships > > I imagine the problem is that RDBO's auto-init system looks up classes Ou

Re: [RDBO] Two RDBO hierarchies interfering

2007-06-25 Thread Adrian Howard
On 25 Jun 2007, at 16:52, Ovid wrote: [snip] > Out of curiosity, why rely on the loader? Because it gets it right (for my particular definition of "right" :-) with no work on my part, and persisting the generated code would be work and YAGNI. > I hope you're not doing this to load all of y

Re: [RDBO] Two RDBO hierarchies interfering

2007-06-25 Thread Randal L. Schwartz
> "Adrian" == Adrian Howard <[EMAIL PROTECTED]> writes: Adrian> I dislike tweaking generated code directly since I usually find that Adrian> I want to regenerate it again at some point. For example with the Adrian> apps I'm playing with we've rejigged the schema quite severely a Adrian>

[RDBO] setting many columns in update

2007-06-25 Thread Iļja Ketris
Hello, I am trying to achieve a simple task of updating many columns in a row from a hash. %hash = (field1=>'foo', field2=>'bar' ...) While I can pass a hash to the "new" method $product = Product->new (%hash); I don't see a simple way to update a previously loaded row: $product = Product->ne

Re: [RDBO] setting many columns in update

2007-06-25 Thread John Siracusa
On 6/25/07, Iļja Ketris <[EMAIL PROTECTED]> wrote: > I am trying to achieve a simple task of updating many columns in a row from > a hash. %hash = (field1=>'foo', field2=>'bar' ...) > While I can pass a hash to the "new" method > > $product = Product->new (%hash); > > I don't see a simple way to up

Re: [RDBO] on the fly fields

2007-06-25 Thread James Masters
> > classes are automatically generated and adding the > functions to the Extra.pm > > doesn't work. > > Why not? Well I don't really understand properly how this Extra.pm file works so am probably doing something wrong then, but I just added the functions in the file viz: package GARD::Book::Extr