db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Strange missing spaces in a Criteria based query
Date Tue, 15 Apr 2014 15:23:17 GMT
Hi all,

I am having some bizarre behaviour from torque v3.3. On a specific machine (RHEL6, Java SE
7u51), an attempt to generate a query from a Criteria object using a join results in the bogus
query below, notice the missing spaces between "payment_note", "JOIN", and "note":

Criteria:: note.effective_date<=>note.effective_date<='2014-04-15 17:13:06':  payment_note.description<=>upper(payment_note.description)
LIKE '%LOM104%':  
Current Query SQL (may not be complete or applicable): SELECT UPPER(payment_note.serial) FROM
payment_noteJOINnote ON payment_note.note_id=note.note_id WHERE note.effective_date<='2014-04-15
17:13:06' AND upper(payment_note.description) LIKE '%LOM104%' ORDER BY UPPER(payment_note.serial)
DESC
[ERROR] AccountingPaymentNoteIndexAction - While trying to search for payment notes from the
database, an exception was thrown. <org.apache.torque.TorqueException: org.postgresql.util.PSQLException:
ERROR: syntax error at or near "ON"
  Position: 387>org.apache.torque.TorqueException: org.postgresql.util.PSQLException: ERROR:
syntax error at or near "ON"
  Position: 387

On a dev machine (running MacOSX 10.8.5) the query builds fine.

Anyone seen anything like this before?

Regards,
Graham
--


---------------------------------------------------------------------
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