I put the code you sent earlier into a test script and ran it.  It
appeared to work for me.  I don't actually have any db tables, but it
generated the expected SQL:

    # File: test.pl
    [ all those class definitions you posted earlier ]
    ...
    local $Rose::DB::Object::Manager::Debug = 1;
    my $books =
      GARD::Book::Manager->get_books(
        query => [title => { like => '%chess%' }],
        require_objects => [ 'booktype' ]);

I pointed it at an SQLite database and ran it:

  % perl ./test.pl
  SELECT
    t1.allgamesenteredby AS t1_allgamesenteredby,
    t1.author AS t1_author,
    t1.booktypecode AS t1_booktypecode,
    t1.coverage AS t1_coverage,
    t1.edition AS t1_edition,
    t1.firstedpublished AS t1_firstedpublished,
    t1.gamepages AS t1_gamepages,
    t1.history AS t1_history,
    t1.isbn AS t1_isbn,
    t1.oldcomment AS t1_oldcomment,
    t1.origpublished AS t1_origpublished,
    t1.publisher AS t1_publisher,
    t1.publishyear AS t1_publishyear,
    t1.submittercode AS t1_submittercode,
    t1.title AS t1_title,
    t1.uid AS t1_uid,
    t2.code AS t2_code,
    t2.description AS t2_description,
    t2.uid AS t2_uid
  FROM
    books t1,
    booktypes t2
  WHERE
    t1.title LIKE ? AND
    t1.booktypecode = t2.code (%chess%)
  DBD::SQLite::db prepare failed: no such table: books(1) at ...

I think something else is going on here, but I'm not sure what.  If
you can reduce it to a sample db schema and a perl script that can
reproduce the problem, package it all up and email it to me and I'll
debug it.

-John

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to