Hello again,

I just started a project with Rose::DB::Object and I must say I am 
very impressed. It is really great!
But still, I run into one or the other problem. I hope it is o.k. to 
ask these beginner questions.

At the moment something drives me crazy that can be destilled to 
these few lines of code:

my $id = PVonline::Praxen->new(nr => 1)->load->organisation_id;
print $id;
# prints 1
print PVonline::Praxen->new(nr => 2)->load->organisation_id;
# prints 1
# This is to show that there are two sets with organisation_id = 1

# but now lets look at it the other way round:
print PVonline::Praxen::Manager->get_praxen_count(
    query => [organisation_id => 1]
    # same result with this line:
    # query => [organisation_id => $id]
);
# prints 0 !?!

I get the same result (no hits) with get_praxen and with a 
relationship query from the organisation class.
I even tried to get the sql with get_object_sql. The resulting sql 
looks good and gives the expected results if executed directly with 
the database program after I changed the '?' to 1 and appended a 
semicolon.

It does work in another class with a very similar structure but after 
close examination I cannot find any differences that should matter.

Another observation, found during debugging attempts: 
If I change the query to
    query => [non_existant_field => 1]
I get all the sets in this table and not an error about "non existant 
field in query" as I expected.

Any ideas how I can debug this further? This is really driving me 
crazy!

Thanks again
Michael



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to