[
https://issues.apache.org/jira/browse/CAY-1510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934399#action_12934399
]
kazu commented on CAY-1510:
---------------------------
Thank you for the reply.
I 'm sorry that I forgot to add case arc. I meant
>String sql = "select col1, col2, #result('0' 'java.lang.Integer' 'custom_col')
>from test_table ";
in this case. Error does not happen. but custom_col's value is null. or not
setting.
Best Regards,
> #result directive does not work.
> --------------------------------
>
> Key: CAY-1510
> URL: https://issues.apache.org/jira/browse/CAY-1510
> Project: Cayenne
> Issue Type: Bug
> Affects Versions: 3.0.1
> Environment: jdk:java 6/os:windows xp
> Reporter: kazu
> Priority: Critical
>
> #result directive didn't work when i used SQLTemplate with setPageSize().
> ex)-----------------------------------------------------------------------------------
> String sql = "select col1, col2, #result('0' 'java.lang.Integer'
> 'custom_col' from test_table ";
> SQLTemplate query = new SQLTemplate(TestTable.class, sql);
> query.setCacheStrategy(QueryCacheStrategy.NO_CACHE);
> query.setFetchingDataRows(true);
> query.setPageSize(100);// when this phrase used, custom_col doesn't work.
> query.setStatementFetchSize(100);
> List<DataRow> l = getObjectContext().performQuery(query);
> // data exists
> DataRow dr = l.get(0);
>
> System.out.println(dr.get('col1')); // this phrase output col1's value.
> System.out.println(dr.get('col2')); // this phrase output col2's value.
> System.out.println(dr.get('custom_col')); // this phrase could not output
> custom_col's value.
> ----------------------------------------------------------------------------------------
> col1 and col2 are test_table's attributes.
> and custom_col is not one.
> only if i doesn't use setPageSize. dr.get('custom_col') could output
> custom_col's value.
> Is this bug ? or specification?
> if someone know. please tell me how to avoid this case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.