openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (OPENJPA-852) createNativeQuery Method with string as argument returning identical rows .
Date Sat, 12 May 2012 12:56:49 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rick Curtis closed OPENJPA-852.
-------------------------------

    Resolution: Not A Problem

Closing this issue as it is a number of years old and you didn't respond with Catalina requested
additional information.

Please reopen with additional information if this is still a problem.

Thanks,
Rick
                
> createNativeQuery  Method with string as argument returning identical rows .
> ----------------------------------------------------------------------------
>
>                 Key: OPENJPA-852
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-852
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>         Environment: j2ee5, oracle , unix , websphere
>            Reporter: venkat bapanapalli
>            Priority: Blocker
>
> here is the query 
> Query query = getEntityManager()
>                     .createNativeQuery("SELECT MA_IDENTIFIER, MA_PTN_KY, PGM_ID, DOP_CD,
MDP_SEL_IND, EML_SEQ_NR FROM ATMV2721_MA_DPF  WHERE (MA_IDENTIFIER = ?1 " +
>                             " AND MA_PTN_KY = ?2 " +
>                             " AND PGM_ID = ?3) ", "OrderResults");
> this is the  sql result mapping specifed in the entity for the native query. 
> @SqlResultSetMapping(name = "OrderResults", entities = { @EntityResult(entityClass =
com.aa.selfservice.web.domain.account.EmailOptinVO.class, fields = {
> 	@FieldResult(name = "aAdvantageNumber", column = "MA_IDENTIFIER"),
> 	@FieldResult(name = "partitionKey", column = "MA_PTN_KY"),
> 	@FieldResult(name = "programId", column = "PGM_ID"),
> 	@FieldResult(name = "code", column = "DOP_CD"),
> 	@FieldResult(name = "indicatorString", column = "MDP_SEL_IND"),
> 	@FieldResult(name = "sequenceId", column = "EML_SEQ_NR")}) }).
> The query.getResultList() should return 7 rows of different data instead its returning
7 rows of identical data.
> I have tried createquery(" SQl") no luck .  
> Can some one please help me!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message