in my
DB, I'm not locked into the what the loader is creating each time things get
launched.
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/
-
y and no server is fatal
# 212.241.176.212 priority is p and reverse_name is some.url
# 212.241.176.212 priority is p and reverse_name is another.url
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 th
n't replicate the issue.
Have you thought about using mysqldump with the --no-data option? That will
just dump your schema and you can run the loader against that. Or is it
something a bit more involved than that?
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI
t1.b_id)
>
> But this is tested and works properly too.
So what happens when you concatenate the IDs '1', '12' and '11', '2'? I think
you need a separator in there:
SELECT COUNT(DISTINCT t1.a_id || '-' || t1.b_id)
Che
- Original Message
From: John Siracusa <[EMAIL PROTECTED]>
> This is fixed in SVN. The test you sent me now passes.
Thanks! Any idea when there might be a new stable release?
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CG
n, so a typical build should work. Since it's a quick hack,
it's rather *nix centric and assumes that you have sqlite3 installed. Let me
know if there's a problem.
Cheers,
Ovid
tar zxvf Model-undef.tar.gz
[snip]
cd Model-undef/
Model-undef $ perl Makefile.PL && make &am
ivate email if
> you want).
I'll see if I can get that to you tomorrow. Thanks.
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/
--
fore you ask :)
sub has_standard_hardware {
defined shift->_hardware_spec_id;
}
('_hardware_spec_id' merely refers to a varchar(32) column. Nothing unusual
about it)
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://us
ationships" are supposed
to be used when we don't have foreign keys. I've tried reading through the
docs and the tests on this, but no luck.
This is Rose::DB::Object 0.764.
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easys
s';
eval "require $classname";
if ( my $error = $@ ) {
die "Could not require ($classname): $error";
}
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/
EFAULT($){ return default => shift }
sub LAZY(){ return lazy=> 1 }
sub NOT_NULL() { return not_null=> 1 }
sub PRIMARY_KEY() { return primary_key => 1 }
1;
Anyone see problems with this approach?
Cheers,
Ovid
--
Buy the book -- http://www.orei
should behave.
'one to optional one' should just allow me to set up an 'optional'
second class to be associated with the primary class and delete the
second class, as needed. e.g., if 'A' has an optional 'B', the
existence or non-existence of
1 at line 311
# Server ID is at line 313
So I am assuming that I'm using 'relationships' wrong. I've tried
adding 'required => 0' and 'optional => 1' to my definition, but that
seems to have no affect. How can I have my s
--- Ask Bjørn Hansen <[EMAIL PROTECTED]> wrote:
>
> On Apr 23, 2007, at 9:19, Ovid wrote:
>
> [mysql truncating data values]
> >> Upgrade to 5.x and turn on 'STRICT MODE' or SQL STANDARD mode -
> one
> >> or both of those settings will fi
e shown another use, but since it no longer appears to be on the
Web, it's tough for me to throw that at folks :)
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/
---
hose from an old post. It appears that they are no
longer there :( You can google for them "hugh darwen missing info
without nulls" and get references. I'm sure it's still out there
somewhere.
Sorry about that.
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.
f the distributed tables (at once, rather than iteratively)
and return the table name if one and only one had the required data.
It turns out to be tricky for me to write, though :)
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI
--- John Siracusa <[EMAIL PROTECTED]> wrote:
> On 4/23/07, Ovid <[EMAIL PROTECTED]> wrote:
> > http://tinyurl.com/26hpwz
>
> What's wrong with implementing the scenario described at that URL
> exactly as it's explained, by using multi-column foreign keys
key_columns => { id => 'server_id' },
},
shared => {
class => 'My::Server::Dedicated',
key_columns => { id => 'server_id' },
},
}
cur far away from the
actual code causing the error, thus making things hard to debug.
Thus, I don't see much benefit. Plus, substituting a different meta
class works with any database. Views, as you've pointed out, don't.
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/ca
ure out from Rose is this:
my $operating_systems = OS::Manager->get_os(
query => [ install_vlan => { like => '%' } ],
);
Is there a more correct way of doing this other than using SQL
directly?
Cheers,
Ovid
--
Buy the book -- http://www.oreilly
ng Test::Class).
I'll have to start looking into a more permanent solution soon. I like
what Peter Karman posted and may use that as a starting point.
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://u
--- Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> Sorry, Let me clarify:
>
> Ovid - you have the seed of this readonly class... john mentioned
> what needs to happen for it to get rolled into rose. any chance
> that might happen?
I can give you a definite
exceptions thrown as close to the code
causing it as possible, particularly since large systems can make it
very hard to find out where the offending line is.
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks
;.
Agreed and I have something very similar. As noted in another
response, I just felt it would be good to trap this at the accessor
level to ensure that fatal errors would be reported where the bad code
is.
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI --
--- Ovid <[EMAIL PROTECTED]> wrote:
> My 'read-only' objects now have their very own metadata class.
As a side note, it might be nice if a 'readonly' metadata class were
natively available in Rose::DB::Object, with an optional way of
allowing it to be read/wri
Donhost::OS->new( os => 'ubuntu' );
The hack guarantees that only things like the following throwing
exceptions:
$os->os('windows');
$os->description('sucks');
The hack relies on the order of call stack frames being different when
I'm constructing an
--- "Randal L. Schwartz" wrote:
> >>>>> "Ovid" == Ovid <[EMAIL PROTECTED]> writes:
>
> Ovid> Ack! A 'do nothing' elsif branch? Much cleaner:
>
> Nope, that changed the meaning. If I provide a value in updates,
> it
xt if $column->is_primary_key_member;
my $getter = $column->accessor_method_name;
my $setter = $column->mutator_method_name;
if ( exists $updates{$getter} ) {
$new->$setter( $updates{$getter} );
}
else {
$new->$setter( $self-&g
ry much like to be in a position where if someone sees a
property named "username", they don't know or care whether or not
that's an ID and eventually, I can throw surrogate keys on the
"accounts" table and no longer worry about whether or not a "username"
needs
d to do is this:
sub add_columns {
my $self = shift;
$self->SUPER::add_columns(@_);
foreach my $column ( $self->columns ) {
$self->alias_column(
$column->name => $self->class->public_colum
$self->make_override( $method );
}
The 'mutators' would return all 'set_*' type methods along with the
'update', 'delete', etc. methods.
And thanks for your response. I'm really liking what I see in Rose :)
Cheers,
Ovid
--
Buy the book -- http
32 matches
Mail list logo