db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Zepezauer <azepeza...@you.net>
Subject Re: Criteria object doesn't generate SQL.
Date Thu, 12 Jul 2012 23:42:44 GMT

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_DAT
>>E);          mLogger.info("SQL: " ["+tCrit+"]");  try { return
>>ArchTUserRetailerCouponPeer.doSelectJoinTRetailerCouponAndTRetailerCo
>>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.RETA
>>ILER_COUPON_ID AND
>>t_retailer_coupon.RETAILER_COUPON_ID=t_retailer_coupon_metadata.RETAI
>>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.-tp34152
>>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.-tp34152440p34153815.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


Mime
View raw message