Hello,

I just stumbled upon a changed behaviour that causes my app to crash 
with RDBO 0.764 (works with 0.758).

The problem occurs in a method that should give me all the groups a 
user (therapeut in my case) is not in:

sub notingroups {
    my $self = shift;
    my $nr = $self->nr;  # user id
    return PVonline::Gruppen->get_gruppen(
        clauses => [qq{NOT EXISTS 
            (SELECT * FROM gruppenzuordnung 
                WHERE gruppe_id = t1.nr 
                and $nr = therapeut_id
            )
        }],
        sort_by => 'name',
    )
}

The subselect I use, relies on the aliasing of 'gruppen' to 't1'. Of 
course I can just change the definition to use the original table 
name but since I didn't find any mention in the change log, perhaps 
this is a bug?
All I found was this:
    * Turned off unique column aliases by default and added the
      unique_aliases Manager parameter to turn them back on.
But this is in the change log for 0.758 -- the version that still has 
the alias -- and even if I set
$Rose::DB::Object::Manager::unique_aliases = 1;
there are no aliases in 0.764.

Or is there a way to get the same result without a subselect, so that 
the whole SQL is behind the scenes and I don't have to watch out for 
future changes in the generated SQL?

-- Michael


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to