et
> https://lists.sourceforge.net/lists/listinfo/rose-db-object
>
--
______
WaySpa.com - The World's Premier Spa Booking Agency
Derek Watson, C.T.O.
298 Campbell Ave
Web:www.WaySpa.com
Ph: 416.482.9033 x 22
Fax:416.981.3109
Sales/Customer Care/Conc
That's ok, if you could just issue another release on CPAN just for this bug
that would be great :P
Thanks John!
On 12/13/07, John Siracusa <[EMAIL PROTECTED]> wrote:
>
> On Dec 13, 2007 11:58 AM, Derek Watson <[EMAIL PROTECTED]> wrote:
> > Is there a reason why I ca
Is there a reason why I can't set the first value of an array to NULL? I
want to store this {NULL, 1, 2, 3} by way of an RDBO array column but I
think the following function from Rose::DB 0.737 is preventing me from doing
so:
sub format_array
{
my($self) = shift;
my @array = (ref $_[0]) ? @{$
>
> I just meant that it'd be a change in historic behavior that could
> break some people's code when they upgrade (not that RDBO is 1.0 yet,
> but it's still nice to avoid this kind of thing, if possible).
This is off-topic, but what lies ahead on the road between RDBO 0.7xx and
1.0? Are there
I'll second that, I've been making heavy use of the following bug
fixes from the SVN trunk:
- set boolean column to undef -> sets null in the DB
- count interface improvements for a many-to-many when using Pg
- Updating a lazy loading BYTEA column in Pg
Needless to say they're all working great!
Is there a way to set a RDBO boolean column to NULL? It seems to me
that undef evaluates to FALSE.
$obj->bool_column(undef);
$obj->save;
print $obj->bool_column; # 0
Should I be creating my own column class for this?
-
This
Thanks for this!
On 7/4/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> On 6/11/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> > I am using Column::Pg::Bytea and loving it, but I find that the
> > special bind_param() work that Rose does for me does not happen when
> It seems like a simple concat (pg operator ||) would work in this case:
>
> SELECT COUNT(t1.a_id || t1.b_id)
Ugh, I forgot the DISTINCT again:
SELECT COUNT(DISTINCT t1.a_id || t1.b_id)
But this is tested and works properly too.
-
> What you need is
>
> COUNT(DISTINCT some_function_that_joins_all_args(arg, arg))
>
> because you really want "4,5" to be counted distinctly from "4,6".
> So coalesce definitely doesn't do it.
Right,
It seems like a simple concat (pg operator ||) would work in this case:
SELECT COUNT(t1.a_id
> > Which dies because $count is assigned zero, making the statement
> > evaluate false.
>
> Whoops, careless copy/paste. That's fixed in SVN now.
Great, thanks very much!
>
> > 2. If I am counting objects related by a many-to-many where the
> > mapping table has a multi-valued primary key, the
Hello,
I am trying to move to related_count() method calls in my RDBO (0.764)
app, they seem so convenient and quick. I am running into two separate
bugs, however:
1. A fatal error is thrown when the object count is zero. I believe
this is happening around line 2749 of MakeMethods::Generic:
$cou
I am using Column::Pg::Bytea and loving it, but I find that the
special bind_param() work that Rose does for me does not happen when
updating a lazy-loading column.
Is there a way to get these 2 things working together? Bytea columns
are a good candidate for lazy-loading, since you likely want to
ing IDs
back-and-forth, eg. If you set $a->b({ name => 'test' }), will Rose
know to map the b back to the a as well as mapping the a to the b?
Which is a cleaner approach?
On 5/18/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> On 5/18/07, Derek Watson <[EMAIL PROTECTE
>
> It's on the list, but not at the top just yet. (Even just collecting
> and editing recipes takes time.) If someone else wants to head this
> up, let me know.
Is there a Wiki installed somewhere we can start working on in an
ad-hoc fashion?
---
Hello all,
Please help me get this working right in Rose,
CREATE TABLE a (
id serial primary key,
name text
);
CREATE TABLE b (
id serial primary key,
a_id integer,
archived_at timestamp
UNIQUE KEY (a_id, archived_at)
);
What I am trying to express here is that "a" is related to man
I have gone down a similar path before,
http://www.mail-archive.com/rose-db-object@lists.sourceforge.net/msg01792.html
The short story is that a map_record is not designed to be
manipulated, it's only there for convenience when fetching related
objects from a many-to-many relationship call, such
I'll dig around for it, I guess I missed it if it came through the
list earlier.
On 5/1/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> On 5/1/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> > I feel like I'm repeating work here -- I've got a similar set of
>
I feel like I'm repeating work here -- I've got a similar set of
functions that serialize and restore trees of objects, only I'm doing
this in a very specific way, keeping only what I want from specific
classes (not reusable).
What are the chances of this object_tree code making it into 0.764 or
e
And you finally settled on "Postgresquella"?
On 4/27/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> Thanks to all. Incidentally, "Rose" was one of my name choices for
> her, but my wife nixed it :)
>
> -John
>
> -
> This SF.
Congrats!
On 4/27/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> Sorry for any delays in responding to RDBO issues or email. We just
> had a baby (our second) and things will likely be a bit hectic here
> for a while... :)
>
> -John
>
>
Just wanted to chime in and mention that I'm using this as well. I
prefer the Rose way of building queries to other modules that I have
used in the past, such as SQL::Abstract.
Any chance of getting support for HAVING to go along with GROUP BY?
Cheers,
On 3/27/07, John Siracusa <[EMAIL PROTECTE
ore
important information about the relationship. Do I have to do this
after the save()? Seems trivial in the above example but these
operations happen in completely separate areas in my code.
Cheers,
Derek
On 4/11/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> On 4/11/07, Derek Wat
.
On 4/11/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> One more thing, I am now testing this code outside of mod_perl and
> getting the same results.
>
> On 4/11/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> > > No, the Manager does no caching. Given the code
One more thing, I am now testing this code outside of mod_perl and
getting the same results.
On 4/11/07, Derek Watson <[EMAIL PROTECTED]> wrote:
> > No, the Manager does no caching. Given the code you posted, I can't
> > see a way that this could ever happen. Map r
> No, the Manager does no caching. Given the code you posted, I can't
> see a way that this could ever happen. Map records only (optionally,
> and not by default) appear when you're asking for a many-to-many
> relationship in your Manager call using the with_objects or
> require_objects parameter
Hello,
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 (@$items) {
die $item->map_record if ($item->map_record);
}
The
What would this support look like? How would the sequence be
specified, and how would it behave on insert, update, etc.?
I suppose my use of serial/sequence columns is too specific to bother adding
to the API, but basically
some_seq_column => { type => 'serial', not_null => 1, sequence => 'so
Hello,
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, and I find myself writing (and re-writing) this
into my classes:
sub insert {
my $self = shift;
unless ($se
I agree that performing a group of actions in a single transaction is one of
the prettiest features of RDBO, and I also like John's approach to making
these shortcuts to Manager routines. I find myself constantly re-writing my
table relationships for manager calls.
On 2/6/07, Ask Bjørn Hansen <
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 for is something expressive like
$product->find_prices(qu
Hello,
What is the recommended idiom for deleting a single object from a
one-to-many relationship? Using the textbook example,
$p = Product->new(name => 'Kite');
$p->prices({ price => 1.23, region => 'US' },
{ price => 4.56, region => 'UK' });
$p->save; # database is modified here
Ho
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 an order-of-operations
problem for me, because validat
Hello,
I am using RDBO in conjunction with Rose::HTML::Form for the first time, and
wonder if there are any guides or examples out there showing some
conventional integration techniques. Specifically, how best to use RHF's
objects returned by object_from_form() style methods to update database
r
33 matches
Mail list logo