[ 
https://issues.apache.org/jira/browse/OPENJPA-852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667557#action_12667557
 ] 

Catalina Wei commented on OPENJPA-852:
--------------------------------------

Venkat,
We need more information in order to help you...

Could you post the following info ?
1  java source code of entity class - 
com.aa.selfservice.web.domain.account.EmailOptinVO 
2. how do you call query.setParameter() 

> 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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to