On 10/25/07, Arshavir Grigorian <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am having trouble formatting dates in Template Toolkit.
>
> $file->create_dt(format => '%m/%d/%Y %H:%M:%S') - works fine.
>
> But
>
> [% file.create_dt(format => '%m/%d/%Y %H:%M:%S') %] or
> [% file.create_dt.format('%m/%d/%Y %H
On 7/11/07, mla <[EMAIL PROTECTED]> wrote:
Do most of you use Rose::HTML::Form to validate
user-supplied data before constructing RDBO your
RDBO objects?
I do for many of my apps.
Do you define the form constraints separately from
the RDBO model constraints? Or is there a way to
reuse one or
On 6/14/07, John Siracusa <[EMAIL PROTECTED]> wrote:
On 6/13/07 9:29 PM, Cees Hek wrote:
> Could you not just join the locations table twice?
Actually, in the latest version, I don't think you can do that. But I
wonder if I should (re)allow it. Opinions?
Well, joining the sa
d,
t3.name,
t3.route_id,
t3.type
FROM
routes t1,
locations t2,
locations t3
WHERE
t2.name = ? AND
t2.type = ? AND
t3.name = ? AND
t3.type = ? AND
t1.id = t2.route_id AND
t1.id = t3.route_id
ORDER BY t1.id
I am not
again to find out what id was assigned to the row (some DBD
modules provide the last insert ID, but I don't think it is very
consistent across databases).
Cheers,
Cees Hek
-
This SF.net email is sponsored by DB2 Expres
On 5/30/07, David Lloyd <[EMAIL PROTECTED]> wrote:
>
> Hi There,
>
>
> Is there a way to cope with a table that does not have a primary key?
Can you not just make all the columns belong to the primary key? That
will work unless your schema allows you to create two identical
records in the databas
On 2/22/07, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
> On Wed, 21 Feb 2007 09:40:53 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
>
> JS> You're right that the on_set trigger happens after the column value
> JS> has been set. I could probably stand to add a few more trigger events
> JS> (e.g., b
On 1/31/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> So, does this method type seem useful? If so, what do you think of
> the method type name ("find") and the default method name format
> ("find_")?
Yes, this is very useful. I do this type of query all the time, and
it is one of the very few
On 1/19/07, Danial Pearce <[EMAIL PROTECTED]> wrote:
> On 1/19/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> > VIEWs are great, because they work out essentially as tables -- so
> > you can create ROSE DB objects for selecting (though not inserting)
>
> Sure you can do inserting. You can either
On 11/13/06, John Siracusa <[EMAIL PROTECTED]> wrote:
> On 11/12/06 8:10 PM, Cees Hek wrote:
> > The circular dependancy between Rose::Object and Rose::DateTime is
> > causing test failures when installing Rose::Object (when
> > Rose::DateTime is not yet installed).
The circular dependancy between Rose::Object and Rose::DateTime is
causing test failures when installing Rose::Object (when
Rose::DateTime is not yet installed). The test module Person2.pm uses
Rose::Object::MakeMethods::DateTime, so any tests that use the
Person2.pm class in the test suite shoul
On 7/10/06, Ask Bjørn Hansen <[EMAIL PROTECTED]> wrote:
>
> On Jul 10, 2006, at 11:05 AM, John Siracusa wrote:
>
> > I have similar questions for as_json(). How should this work?
>
> Like you described (IMO).
>
> The more complicated schemes have their place, but for 80% (98%?) of
> the applicatio
On 6/19/06, John Siracusa <[EMAIL PROTECTED]> wrote:
> I added that feature to the Loader recently, but have not documented
> it yet. Try using setting the manager_base_class attribute on the
> Loader object before making your classes. It should do what you want.
I swear I did a search through t
Auto-generated Manager classes have both a 'use base' statement and an
@ISA declaration.
--
package LGG::DB::Booking::Manager;
use base qw(Rose::DB::Object::Manager); # < should be sufficient
use LGG::DB::Booking;
our @ISA = qw(Rose::DB::Object::Manager); # < superfluous
s
On 6/7/06, John Siracusa <[EMAIL PROTECTED]> wrote:
> On 6/7/06 1:23 PM, Cees Hek wrote:
> > This is a very old thread that I am resurecting, but I have recently
> > needed to use postgres time columns in my app, and wondered if anyone
> > has pursued this since this di
On 1/11/06, John Siracusa <[EMAIL PROTECTED]> wrote:
> I had Pg time types in a few early versions of RDBO, but I could never
> decide on a nice client-side representation. An integer seems like a
> strange choice to me. DateTime objects aren't really appropriate because
> time columns have no da
On 5/29/06, John Siracusa <[EMAIL PROTECTED]> wrote:
On 5/29/06 9:28 PM, Cees Hek wrote:
> I have attached a script that demonstrates the problem
Thanks. I found the bug (the chkpass method simply wasn't doing what it's
supposed to do) and it's fixed now in SVN. Th
On 5/29/06, John Siracusa <[EMAIL PROTECTED]> wrote:
On 5/29/06 9:21 PM, Cees Hek wrote:
> The fact that it dies with the word 'dubious' doesn't give me much to
> go on.
Next time try running it with "perl -I lib t/whatever.t" instead of using
the "prov
On 5/29/06, John Siracusa <[EMAIL PROTECTED]> wrote:
On 5/29/06 1:54 PM, Cees Hek wrote:
> I think I have found a bug in the chkpass support for Pg in
> Rose::DB::Object. If you load an existing row from the database, then
> make a change to a column (not the password column), an
g the test suite.
On 5/29/06, Cees Hek <[EMAIL PROTECTED]> wrote:
Hmmm. I'll do some more tests and see what I come up with. I do have
the column setup in the DB correctly, and the RDBO object was created
with the Loader, which picked up the chkpass column properly.
I'll try the te
On 5/29/06, John Siracusa <[EMAIL PROTECTED]> wrote:
On 5/29/06 1:54 PM, Cees Hek wrote:
> I think I have found a bug in the chkpass support for Pg in
> Rose::DB::Object. If you load an existing row from the database, then
> make a change to a column (not the password column), an
I think I have found a bug in the chkpass support for Pg in
Rose::DB::Object. If you load an existing row from the database, then
make a change to a column (not the password column), and then save the
changes, the password field will be blanked out.
my $user = User->new( id => 1 );
$user->load;
I noticed that when I try to set a boolean value to 0 it successfully
sets the value to false, but then fails to save the changes to the DB
when I call $object->save. This doesn't happen when you set the value
to 'f' or 'n' or any other value that has a 'defined' value.
The attached simple patch
On 3/24/06, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> Many, many thanks! It is really great how all of you help a poor
> little newbee like myself ;-)
In all my years of perl, I have received a lot more help than I have
given. So I still owe a lot to the perl community, and I doubt I'll
be ab
On 3/24/06, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> Say, I have two tables: vendors and products.
> Now I want a list of all the vendors that have no products yet.
> This can be seen from the products table if there are no records with
> the vendor_id of the vendor in question.
> Is this poss
On 1/12/06, Sean Davis <[EMAIL PROTECTED]> wrote:
> Cannot load ApacheAdmin::Model::User without a primary key (username) with a
> non-null value or another unique key with at least one non-null value. at
> test.pl line 9
>
> If I remove the inheritance from Catalyst::Model, everything works fine.
On 12/28/05, John Siracusa <[EMAIL PROTECTED]> wrote:
> All tests pass for me in Pg 8.1. I was able to reproduce your errors by
> downgrading my Pg to 7.4.7, and I'll work on fixing them for the next
> release.
Thanks John,
Just a little bit more info on the sequence failures. I ran into the
sa
On 12/28/05, John Siracusa <[EMAIL PROTECTED]> wrote:
> Thanks. I'll set the env var in the test suite. I'd be interested to know
> if this setting works for you in your actual code:
>
> http://search.cpan.org/dist/Rose-DB/lib/Rose/DB/Pg.pm#european_dates
Adding that option to my Rose::DB class
Here are some more test errors that I am running into with the Pg
tests. In the db-object-auto.t test, it looks like a sequence can
not be found. In the test file, there seem to be two different ways
of naming the sequence - with an uppercase R or a lowercase r.
Rose_db_object_test_seq
rose_db_
On 12/28/05, John Siracusa <[EMAIL PROTECTED]> wrote:
> Thanks. I'll set the env var in the test suite. I'd be interested to know
> if this setting works for you in your actual code:
>
> http://search.cpan.org/dist/Rose-DB/lib/Rose/DB/Pg.pm#european_dates
Haven't worked dates into my sample app
The Pg tests will fail if PostgreSQL is configured with European date
styles (ie D/M/Y instead of the american M/D/Y). The easiest solution
is to set the PGDATESTYLE environment variable before you run the test
suite, and a simple doc patch should suffice to let users know about
this when running
> relationship. Then again, it also has more visual noise.
Here are a few other options:
require_objects => [ 'vendor..addresses..state' ]);
require_objects => [ 'vendor^addresses^state' ]);
require_objects => [ 'vendor&a
32 matches
Mail list logo