db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fox <Thomas....@seitenbau.net>
Subject Re: Criteria object doesn't generate SQL.
Date Sat, 21 Jul 2012 13:12:31 GMT

There is also nothing that I'd spot.
But then I have no experience with torque 3.1, it is rather old.
If I were you I'd try to remote-debug the application, if that is possible.

     Thomas

 -----Anthony Zepezauer wrote: -----

> torque-3.1.jar
>
> I've since discovered that the code in the two
>environments was *not* the same.  There was a file that was generated
>locally that didn't get checked in, and didn't show up in a diff
>because it hadn't been added.  (ArchTUserRetailerCoupon is a new
>table, which I added to schema.xml generated the Torque classes for
>locally.) But, checking in that file didn't fix the problem.  So now
>I'm thinking that something else is still missing, that got created
>when I generated the new classes.  But I tried svn status | grep -e
>^? which shows anything not under svn control, and found nothing that
>looks torque related:  AZepezauer-MacBook:app_source_trunk
>azepezauer$ svn status | grep -e ^? ?       App_source.iml ?
>.idea ?       .project ?       .classpath ?       bin ?
>java/report.softcoin.om.generation ?       doc/mediaCache ?
>doc/softcoin/consumers/includes/js ?
>doc/softcoin/consumers/includes/maincontent/3791/24_partner_bak.jsp ?
>      doc/softcoin/consumers/includes/maincontent/3791/temp1.jsp ?
>   doc/softcoin/consumers/includes/maincontent/3791/temp2.jsp ?
>doc/softcoin/consumers/includes/maincontent/3791/temp3.jsp ?
>doc/softcoin/consumers/includes/maincontent/3791/24_partner.jsp.bak ?
>      doc/softcoin/consumers/includes/topnav/3791/topnav.jsp.bak ?
>   doc/softcoin/consumers/includes/css/7450/ytbs2.css ?
>doc/softcoin/consumers/includes/headers/3791/header.jsp.bak  except
>for java/report.softcoin.om.generation, which as I understand it is
>only informational and not needed for functionality.  This are the
>new files I've added to SVN so far:  ArchTUserRetailerCoupon.java
>ArchTUserRetailerCouponPeer.java BaseArchTUserRetailerCoupon.java
>BaseArchTUserRetailerCouponPeer.java
>ArchTUserRetailerCouponMapBuilder.java  does anything look missing?
>Thomas Fox-2 wrote: >  >  > Which Torque version are you using ? >  >
>   Thomas >  > -----Anthony Zepezauer wrote: ----- >  >>To:
>torque-dev@db.apache.org >>From: Anthony Zepezauer
><azepezauer@you.net> >>Date: 12.07.2012 08:22PM >>Subject: Re:
>Criteria object doesn't generate SQL. >> >> some small edits:  I'm
>having a very confusing problem, hoping >>somebody here can shed some
>light.  Here's the snippet where it >>occurs:  <code> Criteria tCrit
>= getCriteria();
>>>tCrit.addIn(TRetailerCouponPeer.RETAILER_COUPON_ID,
>>>retailerCouponIds);
>>>tCrit.addJoin(TRetailerCouponPeer.RETAILER_COUPON_ID,
>>>ArchTUserRetailerCouponPeer.RETAILER_COUPON_ID);
>>>tCrit.add(ArchTUserRetailerCouponPeer.USER_RETAILER_ID,
>>>retailerCardInfo.getId());
>>>tCrit.add(TRetailerCouponPeer.CHAINED_TO_COUPON_ID, (Object) null,
>>>Criteria.ISNULL);
>>>tCrit.addJoin(TRetailerCouponPeer.RETAILER_COUPON_ID,
>>>TRetailerCouponMetadataPeer.RETAILER_COUPON_ID);
>>>tCrit.addDescendingOrderByColumn(ArchTUserRetailerCouponPeer.REDEEM
>_D >>ATE);
>>>tCrit.addDescendingOrderByColumn(ArchTUserRetailerCouponPeer.TAKE_D
>AT >>E);          mLogger.info("SQL: " ["+tCrit+"]");  try { return
>>>ArchTUserRetailerCouponPeer.doSelectJoinTRetailerCouponAndTRetailer
>Co >>uponMetadata(tCrit); } catch (TorqueException e) {
>>>mLogger.error("Unable to select user coupons", e); returnnull; }
>>></code>  when I run this code on my local build, it runs fine, and
>>>the output from the log statement looks like this:  <code> SQL:
>>>[Criteria::
>>>arch_t_user_retailer_coupon.USER_RETAILER_ID<=>arch_t_user_retailer
>_c >>oupon.USER_RETAILER_ID=20067:
>>>t_retailer_coupon.CHAINED_TO_COUPON_ID<=>t_retailer_coupon.CHAINED_
>TO >>_COUPON_ID IS NULL :   Current Query SQL (may not be complete or
>>>applicable): SELECT  FROM arch_t_user_retailer_coupon,
>>>t_retailer_coupon, t_retailer_coupon_metadata WHERE
>>>arch_t_user_retailer_coupon.USER_RETAILER_ID=20067 AND
>>>t_retailer_coupon.CHAINED_TO_COUPON_ID IS NULL  AND
>>>t_retailer_coupon.RETAILER_COUPON_ID=arch_t_user_retailer_coupon.RE
>TA >>ILER_COUPON_ID AND
>>>t_retailer_coupon.RETAILER_COUPON_ID=t_retailer_coupon_metadata.RET
>AI >>LER_COUPON_ID ORDER BY arch_t_user_retailer_coupon.REDEEM_DATE
>DESC, >>arch_t_user_retailer_coupon.TAKE_DATE DESC] </code>  But,
>when I >>check in my code, build and run it on a shared DEV server,
>the output >>looks like this:  <code> SQL: [Criteria::
>>>arch_t_user_retailer_coupon.USER_RETAILER_ID<=>arch_t_user_retailer
>_c >>oupon.USER_RETAILER_ID=20067:
>>>t_retailer_coupon.CHAINED_TO_COUPON_ID<=>t_retailer_coupon.CHAINED_
>TO >>_COUPON_ID IS NULL :   Current Query SQL (may not be complete or
>>>applicable): ] </code>  Note that the entire 'Current Query SQL' is
>>>missing.  And then the actual join fails.  (I can post the stack
>>>trace if desired, but IMHO it's irrelevant because the problem has
>>>already occurred - the join is failing because there's no SQL to
>>>execute.)   SVN confirms that the code is identical in both cases,
>>>including schema.xml.  The DB being connected to is the same in
>both >>cases.  So, can anybody shed any light on why the Criteria
>object >>would generate the SQL in one case and not the other?
>Again, I can >>send the stack trace or any other info that might be
>helpful. -- >>View this message in context:
>>>http://old.nabble.com/Criteria-object-doesn%27t-generate-SQL.-tp341
>52 >>440p34152451.html Sent from the Apache DB - Torque Dev mailing
>list >>archive at Nabble.com.
>>>-------------------------------------------------------------------
>-- >>To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For
>>>additional commands, e-mail: torque-dev-help@db.apache.org >  >  >
>---------------------------------------------------------------------
>> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org > For
>additional commands, e-mail: torque-dev-help@db.apache.org >  >  >
>--  View this message in context:
>http://old.nabble.com/Criteria-object-doesn%27t-generate-SQL.-tp34152
>440p34153815.html Sent from the Apache DB - Torque Dev mailing list
>archive at Nabble.com.
>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For
>additional commands, e-mail: torque-dev-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message