On 4/17/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> i've also started playing around with something that will make you
> cringe, or perhaps chime in with suggestions and enthusiasm !
>
> object_tree_as_storable
> object_tree_from_storable
>
> right now they're being made trave
On 4/16/07 12:22 PM, John Siracusa wrote:
> How about "object_tree" instead of just "object" to better indicate that
> input/output isn't just a long object:
^
Er, "lone"
-John
On 4/16/07 12:07 PM, Jonathan Vanasco wrote:
> i'm thinking of the following naming scheme:
> Helpers::object_as_yaml
> Helpers::init_with_yaml_object
>
> ( using the term 'object' as it is a deep 'loaded related' object,
> not a flat column/pairs )
How about "object_tree" instead of just "object
On 4/16/07 10:26 AM, Ovid wrote:
> I can't find this in the docs, but I'm wondering how I go about an 'is
> not null' search.
query => [ '!install_vlan' => undef ],
http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/QueryBuilder.p
m#query
The example below should work too, but cur
On 4/16/07 10:02 AM, Jonathan Vanasco wrote:
> MyRose::Object::Product
> relationships => [
> colors => {
> type=> 'many to many',
> map_class => 'MyRose::Object:: Product2Color',
> map_from => 'product_id',
> map_to => 'c
On 4/13/07 11:08 PM, Bill Moseley wrote:
> On Fri, Apr 13, 2007 at 07:40:04PM -0700, Bill Moseley wrote:
>> This is still the current situation?:
>>
>> http://www.dev411.com/blog/2006/05/31/rose-db-object-aggregates
>>
>> i.e. Run you own SQL directly with DBI or use Views and a create a
>> t
On 4/14/07 1:16 AM, Jonathan Vanasco wrote:
> is there a way to get Rose to search based on functions?
>
> ie:
> bad
> SELECT * FROM useraccount WHERE email = ?
> good
> SELECT * FROM useraccount WHERE lower(email) = lower(?)
See this thread for some earlier discussion on this topic:
http://www.
as a general-purpose
replacement for SQL::Abstract! :) As I said earlier:
> On 3/27/07, John Siracusa <[EMAIL PROTECTED]> wrote:
>> QueryBuilder was always meant as an internal tool first (used by Manager)
>> that just happens to expose a subset of its functionality publicly.
A
On 4/13/07, Ovid <[EMAIL PROTECTED]> wrote:
> --- Bill Moseley <[EMAIL PROTECTED]> wrote:
>> I would expect that most applications need a shared dbh -- anything
>> that uses transactions, of course. And, therefore perhaps there was a
>> standard approach.
>
> You know, I was rather surprised about
On 4/12/07 10:11 PM, Bill Moseley wrote:
> Ok, I just have to ask. What are people doing for dbh caching?
> I know this comes up often:
>
> http://thread.gmane.org/gmane.comp.lang.perl.modules.dbi.rose-db-object/1138/f
> ocus=1140
>
> [...] I'm also still trying to understand the point of a n
On 4/11/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> What I really want to be able to do is (using an m-to-m's add_on_save)
>
> my $item = My::DBO::Item->new();
> $package->add_items($item);# related by an m-to-m with add_on_save
> $item->map_record->notes('save me too'); # does map_record eve
On 4/10/07, Jeffrey Horn <[EMAIL PROTECTED]> wrote:
> I'd like to actually get an exclusive lock on the record at load
> time. I'd usually do a "SELECT ... FOR UPDATE" to do this in MySQL. Can I
> get that behavior using just the load method above?
No, but "select for update" is on my to-do list
On 4/10/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> I am creating objects from a Manager call:
>
> my $items= My::DBO::Manager::Item->get_items(
> query => [
> sku => int($sku),
> active => 1,
> ],
> );
>
> But they have map_records that I don't want
>
> foreach my $item (
On 4/5/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> Any chance of these features being pushed back into rose?
The first thing you're likely to see is support for triggers on save,
insert, update, and delete because overriding some of those
"correctly" (handling transactions and so on) takes s
On 4/4/07 12:37 PM, Adrian Howard wrote:
> Since there are at least three folk who have wanted this sort of
> functionality - would it be worth adding something like
> is_initialising() to Rose::DB::Object::Util? Just to prevent
> gratuitous wheel reinvention :-)
No, since that'd require extra ove
On 4/4/07 12:05 PM, Ovid wrote:
> Note the 'return' condition. I found that if I didn't have that in,
> the following would throw an exception:
>
> my $os = Donhost::OS->new( os => 'ubuntu' );
>
> The hack guarantees that only things like the following throwing
> exceptions:
>
> $os->os('wi
On 4/3/07, Randal L. Schwartz wrote:
> sub make_clone {
> ## clone the object except for primary keys and new items
> my $self = shift;
> my %updates = @_;
>
> my $new = (ref $self)->new;
> for my $column ($new->meta->columns) {
> my $getter = $column->acc
On 4/3/07, Ovid <[EMAIL PROTECTED]> wrote:
> What we're trying to do is use an ORM to make it easy to pull all
> database knowledge into a given layer and actually expose *very* little
> of structure, just the functionality. However, because surrogate
> (non-identifying) keys are rarely used, I ha
On 4/3/07 5:31 AM, Ovid wrote:
> One problem is that the return value of add_columns() is actually the new
> number of columns in the 'columns_ordered' attribute, not the columns
> themselves
Doh! Fixed in SVN.
> To be fair, I'm going to have to alter even this. I've realized that
> I'm making
On 4/2/07, Ovid <[EMAIL PROTECTED]> wrote:
> I didn't see it in the docs, but is there anything akin to 'mutator'
> metadata which would let me do something like the following?
>
> foreach my $method ( $class->mutators ) {
> $self->make_override( $method );
> }
>
> The 'mutators' would retu
On 4/2/07, [EMAIL PROTECTED] wrote:
> sub setup {
> my ( $self, %arg_for ) = @_;
> $self->SUPER::setup(%arg_for);
> foreach my $column ( $self->columns ) {
> my $name = $column->name;
>
> # here's the problem
> $self->alias_column( $name => "_$name"
On 4/2/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> I'm adding a new table with 2 unique indexes / keys on it , one of
> which is a multiple column key. the docs are really unclear on how
> thats done in the setup.
http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/Metadata.pm#uni
On 4/2/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> doc change:
> with_managers seems to default to true , it should be listed as such
It is. File: lib/Rose/DB/Object/Loader.pm
...
=item B
If true, create
L-derived manager
classes for each L subclass. Defaults to the value
of the l
On 3/29/07 6:27 AM, James Masters wrote:
> So now $products is an array of all product information, just
> like %product was a hash of all product info. But how do I
> elegantly get that stock quantity info for a particular location
> out of the $products array? I need something like:
>
> foreac
On 3/28/07, Adrian Howard <[EMAIL PROTECTED]> wrote:
> CREATE TABLE products (
> id SERIAL NOT NULL PRIMARY KEY,
> nameVARCHAR(255) NOT NULL,
> vendor_id INT REFERENCES vendors (id),
> UNIQUE(name)
> ) TYPE = InnoDB;
While it will happily acc
On 3/27/07, Robert James Kaes <[EMAIL PROTECTED]> wrote:
> CREATE TABLE locations (
> id INT,
> ...);
>
> CREATE TABLE companies (
> id INT,
> location_id INT NOT NULL REFERENCES locations(id),
> ...);
>
> CREATE TABLE exhibitions
On 3/27/07, Robert James Kaes <[EMAIL PROTECTED]> wrote:
> My reading of the Rose::DB::Object::QueryBuilder documentation is that
> build_select() does NOT support the "offset" argument like the
> get_objects() manager method. Is this an oversight, or is there a
> fundamental reason why build_sele
On 3/26/07, Jeff Chimene <[EMAIL PROTECTED]> wrote:
> make_classes();
>
> sub make_classes
> {
> use base qw(Rose::DB Rose::DB::Object::Loader);
You do not need to inherit from Rose::DB::Object::Loader. Loader is a
standalone class that can do work for you. It's not part of
On 3/26/07, Jeff Chimene <[EMAIL PROTECTED]> wrote:
> John Siracusa wrote:
>> On 3/23/07, Jeff Chimene <[EMAIL PROTECTED]> wrote:
>>> How do I eliminate the following error message?
>>> $ perl ./fred.pl
>>> Subroutine init_db rede
On 3/24/07, Randal L. Schwartz wrote:
> > "rose" == rose <[EMAIL PROTECTED]> writes:
> rose> I'm using Rose with a fairly large MySQL database and using an
> rose> iterator like
>
> rose> my $itr = Bar->get_bars_iterator();
> rose> while($itr->next()) {
>
> rose> won't work because by
On 3/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Fri, 23 Mar 2007, John Siracusa wrote:
>> If you add the same bar twice, it'll add a new mapping each time.
>> That's what add_bars() does.
>
> Given that Rose knows that this is a many-to-many
On 3/23/07, Jeff Chimene <[EMAIL PROTECTED]> wrote:
> How do I eliminate the following error message?
> $ perl ./fred.pl
> Subroutine init_db redefined at inspectDB/DB/Object/AutoBase1.pm line 7.
AutoBaseNNN.pm classes are the automatically generated RDBO base
classes created by the Loader. How i
On 3/10/07, Mike Schilli <[EMAIL PROTECTED]> wrote:
> $foo->add_bars({ string => "I am Bar" });
> $foo->save();
>
> The first time this is run, records for both "I am Foo" in foos and "I am Bar"
> in bars are created [...] and the relationship table contains the mapping:
>
> mysql> sele
On 3/10/07, Cory Bennett <[EMAIL PROTECTED]> wrote:
> I have a column with inflate/deflate triggers and sometimes I get this error:
>
> Not an ARRAY reference at ./Rose/DB/Object/Metadata/Column.pm line 1087
Sorry for the delay. Your patch is applied to SVN. Thanks!
-John
-
On 3/20/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> I'd actually like to see sequence classes
> Rose::DB::Object::Metadata::Sequence
>
> Which lets us map sequences to rose objects , and vice versa
>
> I'd like to be able to call
>
> my $seq= MyApp::Rose::DB::Object::Sequence1
On 3/20/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> Is it possible to get sequence support in RDBO? I know that sequences are
> supported for primary key generation, but I have a few cases where they are
> used for non-keyed columns
What would this support look like? How would the sequence be
s
On 3/19/07, Jeff Chimene <[EMAIL PROTECTED]> wrote:
> BTW, kudos for the make_modules() it did good job on a MySQL schema.
> I couldn't get make_classes() to work, though. From the tutorial
>
> @classes = $loader->make_classes;
> foreach my $class (@classes)
> {
> if($class->isa('Rose::DB::
On 3/17/07, Jeff Chimene <[EMAIL PROTECTED]> wrote:
> I see that Rose hasn't been Debianized. Is this deliberate or has no Deb
> developer filed an ITP?
It's certainly not deliberate. I don't use Debian, but if anyone
wants to "Debianize" RDBO, I'll answer any questions I can...
-John
-
On 3/16/07 3:34 PM, Fred Cox wrote:
> Ideally, I would like to have RDB know to ATTACH the second database and treat
> the two files as one.
>
> From what I can tell of the SQLite database, in the case where the table names
> are unique, the only complication is that all the sqlite_master tables w
On 3/16/07 3:22 PM, Peter Karman wrote:
> I know how to set the default output format for a DateTime object when it is
> stringified. I'm struggling to know where best to set that for my
> DateTime-type
> columns.
>
> Do I create my own Metadata Column subclass and do it there? Or is there some
>
On 3/16/07, James Masters <[EMAIL PROTECTED]> wrote:
> "Creation date $thing{createdate}, postcode: $thing{address}{postcode}".
>
> Yes, I know - I'm an amateur. But it will be a massive job converting all
> this hash methodology to a PERL OO "method" methodology particularly as Rose
> method ca
On 3/15/07 9:14 AM, Peter Karman wrote:
> The latest (0.09) CPAN version of this Catalyst plugin now contains support
> for RDBO. You can specify a RDBO class name as the 'dbi_dbh' config param, and
> it will return the dbh like:
>
> My::RDBO::Session->new->dbh
Shouldn't that be this instead?
On 3/15/07 6:14 AM, Danial Pearce wrote:
>> But if I choose the NOT NULL route, then surely I will still need a special
>> check i.e. if ($date ne '-00-00')
>
> RDBO uses DateTime to handle it's objects I believe. YMMV but I think
> it may handle the -00-00 case under the hood.
-00-00
On 3/4/07, Randal L. Schwartz wrote:
> After running Loader, I got:
>
> sequence => '"foo_bar"'
>
> but when it tried to use that to insert a record, Pg barfed.
>
> Fix was to manually edit all Loader-generated files to be:
>
> sequence => 'foo_bar'
Can you post a test case for this? I
On 3/4/07, Cory Bennett <[EMAIL PROTECTED]> wrote:
> When I fetch all the TableA's via TableB obj, the TableA objects come with the
> enum column marked as modified.
This is fixed in SVN, but note that the last test in your test.pl file
should be:
ok(!defined $mods, "A via B has no modified k
On 3/9/07, Jud Dagnall <[EMAIL PROTECTED]> wrote:
> I would expect that regardless of how the query was constructed, any
> results (projects) returned would be accurate, meaning that they would
> reflect the the state of things in the database at the time that the
> query was executed.
But what yo
On 3/9/07, Cory Bennett <[EMAIL PROTECTED]> wrote:
> I think this is a bug anyway, but it could be a usage error. When using an
> on_set trigger, the return value from the setter is always an empty-string,
> but the set seems to still be working.
Yep, it was a bug. Fixed in SVN. Thanks for the
On 3/9/07, Peter Karman <[EMAIL PROTECTED]> wrote:
> But I don't get this magical method:
>
>$product->delete_prices($price_id);
>
> which would be equivalent to:
>
> sub delete_prices
> {
> my $self = shift;# Product
> my $price_id = shift;
>
> my @keep = grep { $_->id n
On 3/9/07, Jud <[EMAIL PROTECTED]> wrote:
> my $result = My::Project::Manager->get_projects
> (
> query => [
> 'employees.name' => 'jud',
> ],
> with_objects => [ 'employees' ],
> );
>
> I get the expected results (1 item in the test case). However, when I look at
> the list of
On 3/8/07 9:44 PM, [EMAIL PROTECTED] wrote:
> that's all fine and good until i create a table called 'metadata'. :)
Distinct namespaces will avoid that. No need for name mangling. Example:
My::DBObject - common base class
My::DBObject::Metadata - custom metadata class
My::DB::Foo -
On 3/8/07 7:33 PM, Michael Reece wrote:
> here's what i came up with:
>
> in package My::RDBO::_base,
>
> sub meta_class { 'My::RDBO::_meta' }
>
> and then,
>
> package My::RDBO::_meta;
> use base 'Rose::DB::Object::Metadata';
>
> sub auto_prime_caches { 0 }
>
> is this the expected way to do
On 3/8/07 10:21 AM, Uwe Voelker wrote:
> It does work with the real table name or with just 'rel_B.field DESC'.
>
> But wouldn't 'rel_A.rel_B...' be the safer bet? What if 'rel_A' and
> 'rel_B' have the same name?
The "tN" aliases are there to resolve any such ambiguity. (There are also
the "tN_
On 3/7/07, Michael Reece <[EMAIL PROTECTED]> wrote:
> this was causing me problems (always getting counts of 1) because my
> DBI abstraction layer re-implements fetchrow_array, only ever
> returning a list.
Well there's your problem :)
> "[...] For these reasons you should exercise some caution i
On 3/4/07, Randal L. Schwartz wrote:
> After running Loader, I got:
>
> sequence => '"foo_bar"'
Ug, more unquoting bugs. I'll track that down when I have a chance, thanks.
-John
-
Take Surveys. Earn Cash. Influence t
On 3/4/07, Cory Bennett <[EMAIL PROTECTED]> wrote:
> Any ideas or work arounds?
Looks like a bug. The only workaround I can think of is to use the
unset_column_value_modified() function from Rose::DB::Object::Util.
I'll work on a fix...
-John
On 3/3/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> is there any way i can coerce this into rose queries?
Not really, short of using get_objects_from_sql()
> if not, any chance of including these as flags in the future? i'm
> having a db locking / blocking issue on a certain feature right n
On 3/3/07, Randal L. Schwartz wrote:
> Well, I did it. I peered under the hood, because I needed this:
>
> AND
> (f_name || ' ' || l_name) LIKE ?
> AND
>
> And I didn't see any way to do that in RDBO::QueryBuilder. Except in
> the source code, where I figured out I could use:
On 3/1/07 9:57 AM, Jonathan Vanasco wrote:
> i'm actually doing reverse dns now -- as there are some things i've
> considered submitting as patches or releasing via svn , and that made
> sense -- but i just thought it might make sense if theres a
> documented area or prefix ( even that ) for people
On 3/1/07 7:03 AM, Adrian Howard wrote:
> I've got some SET columns which RDBO seems to be parsing fine, since
> the column() values() are set okay, but it accepts things that aren't
> in values(). Bug? Expected behaviour?
Bug, now fixed in SVN. Thanks for the report.
-John
--
On 3/1/07 5:30 AM, Adrian Howard wrote:
> On 1 Mar 2007, at 00:47, Jonathan Vanasco wrote:
>> would it be possible to reserve a namespace within rose db objects
>> for user use?
> [snip]
>
> Using one of the inside-out object classes is one way around this. I
> use Class::BuildMethods.
Or just pi
On 2/28/07 7:42 PM, Fred Cox wrote:
> I haven't seen anything that indicates I can use a
> subselect in the set clause of RDBOM->update_table.
Yeah, there's no real support for subselects except as literals, and even
that only seems to work in the where clause due to a bug. I'll try to fix
the bu
On 2/28/07 7:39 PM, Michael Reece wrote:
> On Feb 28, 2007, at 2:13 PM, Michael Reece wrote:
>> this looks very promising! but what args are passed to select_sql,
>> etc? [...]
Right now, the args are the column metadata object, the db object, and the
table name.
> any suggestions on how to get
On 2/28/07, Michael Reece <[EMAIL PROTECTED]> wrote:
> is it possible to inflate/deflate columns using mysql functions via
> RDBO?
If you're feeling daring, this API is still not public, but I'm pretty
sure it still works:
http://www.mail-archive.com/rose-db-object@lists.sourceforge.net/msg00710.
On 2/27/07, Fred Cox <[EMAIL PROTECTED]> wrote:
> Thanks for the fix!
Actually, don't apply this part:
>> -our $VERSION = '0.733';
>> +our $VERSION = '0.734';
because this is not 0.734 as it will eventually be released. It's
more like 0.733_01.
-John
--
On 2/27/07, Fred Cox <[EMAIL PROTECTED]> wrote:
> Version 761 (latest in FreeBSD ports) RDBO::Loader chooses the wrong primary
> key for this PostgreSQL table:
The column name "year" is auto-quoted (probably a reserved word) and
wasn't being unquoted properly by Rose::DB. The fix is in SVN. The
On 2/27/07, Fred Cox <[EMAIL PROTECTED]> wrote:
> Version 761 (latest in FreeBSD ports) RDBO::Loader chooses the wrong primary
> key for this PostgreSQL table:
Can you post the CREATE TABLE statement and tell me what versions of
Postgres, DBI, and DBD::Pg you're using?
-John
On 2/26/07, Adrian Howard <[EMAIL PROTECTED]> wrote:
> On 26 Feb 2007, at 08:28, Jud wrote:
>> I'm not sure how to get Rose to use only a single database object for all
>> classes and objects. I am looking for a better way than to create a new
>> Rose::DB object at the beginning of every script, an
Third time's the charm? Sigh.
-John
0.763 (02.24.2007) - John Siracusa <[EMAIL PROTECTED]>
* Re-enabled the DBD::SQLite 1.13 work-around in the test suite, which
I temporarily disabled to test a 1.14 candidate and then forgot to
re-enable before the 0.
0.762 (02.24.2007) - John Siracusa <[EMAIL PROTECTED]>
* Fixed an unparseable version number in MakeMethods::BigNum
that was causing CPAN and associated tools to choke.
-John
-
Take Surveys. Earn Cash. Inf
On 2/23/07 9:28 PM, Randal L. Schwartz wrote:
> The rules are defined in ExtUtils::MM, function parse_version.
>
> This is enough to fix it:
>
> if(${Math::BigInt::VERSION} >= 1.78)
>
> Just add braces.
Already fixed in SVN. (I moved the real version number for that file above
that line in S
oject/showfiles.php?group_id=147570
Change logs are below.
-John
Rose::DB::Object:
0.761 (02.23.2007) - John Siracusa <[EMAIL PROTECTED]>
* Added the ability to specify a unique key by name in calls to load().
* Added support for query_args and other Manager parameters to
one-to-one
I'm going to release 0.761 shortly. If you have any outstanding bugs
not fixed in SVN or any other small suggestions, speak now...
-John
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay pa
On 2/21/07, Adrian Howard <[EMAIL PROTECTED]> wrote:
> Rose::DB::Object::Loader->new(
> db => MyApp::DB->new,
> class_prefix => 'MyApp'
> )->make_classes(
> pre_init_hook => sub {
> my $meta = shift;
> $meta->column( 'some_column' )->alias( '_some_column'
On 2/20/07, Michael Reece <[EMAIL PROTECTED]> wrote:
> in a postgres table, i have a column
>
>lat| double precision
>
> the column definitions spit out from $class->meta-
> >perl_class_definition interpreted this as
>
>lat=> { type => 'scalar', length => 8 },
I've
On 2/18/07 1:18 AM, Ask Bjørn Hansen wrote:
> I noticed that save() seems to call insert() or update() as appropriate.
I've updated the docs in SVN to better reflect the fact that save() calls
insert() or update() as appropriate, since that is part of the public API.
-John
---
On 2/17/07 10:22 AM, Graham Barr wrote:
> On Feb 16, 2007, at 7:26 PM, Jonathan Vanasco wrote:
>> On Feb 16, 2007, at 1:11 PM, John Siracusa wrote:
>>> Con: small additional overhead to check and coerce the args
>>
>> wouldn't that require all of these get_
On 2/16/07 9:13 PM, George Hartzell wrote:
> This question still stands, is there a standard way to use mixin
> classes w/ Loader?
The usual way is to create a common base class with all the helpers you
want, then tell the loader to use that class as the base_class.
http://search.cpan.org/dist/Ro
How do people feel about the following shortcuts?
Manager->get_objects([ a => 1, b => 2 ]);
Manager->get_objects({ a => 1, b => 2 });
Both being equivalent to:
Manager->get_objects(query => [ a => 1, b => 2 ]);
This is how the new "find" relationship method type works, and I'm
wonde
On 2/13/07, Graham Barr <[EMAIL PROTECTED]> wrote:
> This could be done by adding a column_exists method to RDBO which would
> only return true if the named column had been loaded from the DB or set
> by calling the accessor method. And have ->load use column_exists instead
> of defined when passed
On 2/12/07, Jud <[EMAIL PROTECTED]> wrote:
>> Allowing a key name to be specified as a parameter to the load() call
>> is a better idea, I think. (That'd require people to give their
>> unique keys nice/sensible/memorable names, of course.)
>
> +1 for this.
In SVN:
$o->load(key => '...');
w
On 2/12/07, Graham Barr <[EMAIL PROTECTED]> wrote:
> On Mon, February 12, 2007 9:48 am, John Siracusa wrote:
>> On 2/11/07, Ask Bjørn Hansen <[EMAIL PROTECTED]> wrote:
>> RDBO uses the first unique key what has a defined value (evaluated in the
>> order they
On 2/11/07, Ask Bjørn Hansen <[EMAIL PROTECTED]> wrote:
> When I run Foo::Model::User::Manager->new(username => 'ask')->load
> (speculative => 1)
>
> the generated SQL is
>
> SELECT bitcard_id, email, id, name, nomail, pass, public_profile,
> username FROM users WHERE email = ? - bind params:
>
> (
On 2/12/07, Ask Bjørn Hansen <[EMAIL PROTECTED]> wrote:
> If I instead of
>
> $p->add_prices
> ({ price => 7.89, region => 'DE' },
> { price => 1.11, region => 'JP' });
>
> $p->save;
>
> do
>
> $p->add_prices({ price => 7.89, region => 'DE' });,
> $p->add_pric
On 2/10/07, Ask Bjørn Hansen <[EMAIL PROTECTED]> wrote:
> I suggest changing the looks_like_map_table to not match "foo_bars",
> but only *_map and "foos_bars". I realize we can just override it in
> our convention manager, but it's a goofy default, I think. Either I
> don't understand entirely
On 2/8/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> Today I think I realized a functionality that might make sense -- if
> the results returned by a manager call weren't simply an array, but a
> class object.
>
> It would behave just as an array - there would be no real difference
> in current
On 2/8/07, Ask Bjørn Hansen <[EMAIL PROTECTED]> wrote:
>On 2/8/07, Michael Reece <[EMAIL PROTECTED]> wrote:
>> i see that i can define the column as
>>
>>saved_on => { type => 'datetime', time_zone => 'America/New_York' }
>>
>> and get the right datetime value, but is there an easy way to
>> in
On 2/8/07 6:10 PM, Jonathan Vanasco wrote:
> actually, how do you feel about this replacement routine?
That looks pretty much like what I checked in after my previous reply :)
(still hunting for all the $self->{'dbh'} instances...)
-John
On 2/8/07 5:54 PM, Jonathan Vanasco wrote:
>> Er, that's a "it already is a get/set method in the latest version."
>
> http://search.cpan.org/~jsiracusa/Rose-DB-Object/lib/Rose/DB/
> Object.pm#dbh
Oh, *that* dbh :) That's some old, probably now inappropriate code. I'll
change it to what the doc
On 2/8/07 5:28 PM, Jonathan Vanasco wrote:
> I want them to have a DB initially.
>
> begin
> fetch
> manipulate, save
> commit / rollback
> kill db
>
> do more stuff that is read only. error out if i try to save
> anything ( no db )
>
> begin
> set db
> load?
> manipulate
> commit rollback
Ah,
On 2/8/07 3:00 PM, Jonathan Vanasco wrote:
> sub make__rose_db_obj {
> my ( $dbh )= @_;
> my $rdb_obj= FindMeOn::RoseDB->new();
> $rdb_obj->{'dbh'}= $dbh;
> return $rdb_obj;
> }
Is FindMeOn::RoseDB a Rose::DB subclass? If so, it has a dbh() method that
takes an argument:
http://search.cpan.org
On 2/6/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> That was pretty much my position, too -- I was looking for something more
> semantically appropriate. My task was trivial to solve in one or two ways, I
> just didn't see any examples on how to do this stuff elegantly. What I am
> really looking
On 2/6/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> How would I go about deleting only the UK price? The following seems to
> delete the UK price record, but leaves it in the collection of $p->prices.
>
> my ($price) = grep { $_->region eq 'UK' } $p->prices;
> $price->delete;
After doing that, yo
On 2/1/07 4:03 PM, Chris Jacobson wrote:
> *{ 'Rose::DB::MySQL::supports_schema' } = sub { 1 };
>
> This suits my purposes for the time being, but it would be nice to see
> this feature included in a future release of Rose::DB::MySQL.
It likely will be.
> I should also say that I have not done
On 2/1/07 3:21 PM, Mike Schilli wrote:
> 1) Two columns of a table form a combined unique key, but neither
>of them can be defined UNIQUE().
Then you'd just define a unique key using those two columns:
SQL: UNIQUE(col1, col2),
RDBO: unique_key => [ 'col1', 'col2' ],
> 2) You have a
On 2/1/07 2:03 PM, Mike Schilli wrote:
> On Thu, 1 Feb 2007, John Siracusa wrote:
>> I question the wisdom of not supplying a sort_by paramater, however.
>
> You're right, in the general case, sort_by is essential, but often
> times, the application knows that there's
On 2/1/07 1:14 PM, Mike Schilli wrote
> On Tue, 30 Jan 2007, [ISO-8859-1] Ask Bjørn Hansen wrote:
>> (although I sometimes get tripped up by forgetting by how ->new->load
>> needs unique keys).
>
> Me too. Does new->load to be restricted to unique keys?
Yes, because each object is linked to a sin
On 1/30/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> I have db_object_from_form() and init_with_db_object() methods that
> will handle a tree of RDBO-derived objects that correspond to a tree
> of nested RHTMLO forms. The code is included at the end of this
> email, but it
On 1/31/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> I think the solution is pretty simple: don't re-validate fields in
> sub-forms when the "cascade" option is on (which it is, by default).
> I plan to include this change in the next release.
...and this change
On 1/31/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> I see that as of 0.546, form validate() calls get passed to sub-forms by
> default,
> * Added a cascade parameter to validate(), which defaults to true.
> (Suggested by Guillermo Roditi)
> Which is great - exactly what I needed! But there is a
On 1/31/07, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
> I would also ask for a load_speculative() method, which simply calls
> load with (speculative=>1). I know about default_load_speculative,
> this is a local override. Yes, it pollutes the namespace--I think
> it's worthwhile.
Something like th
301 - 400 of 1026 matches
Mail list logo