History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-22636
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Peter Gromov
Reporter: Simon Knott
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Named query incorrectly marked as incorrect

Created: 05 Oct 07 01:21   Updated: 06 Dec 07 18:53
Component/s: None
Fix Version/s: Selena 7.0.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Windows XP, JDKU2

Build: 7,323
Fixed in build: 8,018
Severity: High


 Description  « Hide
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>



 All   Comments   Work Log   Change History      Sort Order:
Peter Gromov - 06 Oct 07 15:32
What's the semantics of such 'like' where its left operand is list of strings?

Alexander Strotzky - 04 Nov 07 22:41
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 - 06 Nov 07 18:12
BTW seems that this should be fixed in latest EAPs. Is it true in your project as well as in mine?