Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Peter Gromov
Subsystem
No subsystem
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Simon Knott
    4 years ago (05 Oct 2007 02:21)
  • Updated by   root
    2 years ago (17 Jan 2010 20:53)
  • Jira: IDEADEV-22636
    (history, comments)
 
IDEA-41345 Named query incorrectly marked as incorrect
1
Issue is visible to: All Users
  The issue is visible to the selected user group only
The following query is incorrectly marking the addressLines in the where section of the query as incorrect, saying that a String type is expected. The addressLines attribute of org is a mapped list of Strings and the query works as expected.

<query name="BOSDSOrganisationDAO.QUERY_ORGANISATION_NACS_NAME_POSTCODE_ADDRESS">
<![CDATA[
select org from BOSDSOrganisation org left join org.addressLines as addressLines
where (org.organisationNACSCode like :organisationNACSCode)
and (org.organisationName like :organisationName)
and (org.postcode like :postcode)
and ((addressLines like :addressLine1)
or (addressLines like :addressLine2)
or (addressLines like :addressLine3)
or (addressLines like :addressLine4)
or (addressLines like :addressLine5))
]]>
</query>

Environment: Windows XP, JDKU2

Issue was resolved
Comments (3)
 
History
 
Linked Issues (?)
 
Peter Gromov
  Peter Gromov
06 Oct 2007 16:32
4 years ago
What's the semantics of such 'like' where its left operand is list of strings?
Alexander Strotzky
  Alexander Strotzky
04 Nov 2007 23:41
4 years ago
Peter, because of the left join, addressLines is actually a single record / line from the table referenced by BOSDSOrganisation.addressLines, not a list of records.
I would have named it addressLine though...
Peter Gromov
  Peter Gromov
06 Nov 2007 19:12
4 years ago
BTW seems that this should be fixed in latest EAPs. Is it true in your project as well as in mine?