[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6571) Criteria API generating wrong SQL for IN clause
shay (JIRA)
noreply at atlassian.com
Tue Aug 16 08:34:05 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43251#comment-43251 ]
shay commented on HHH-6571:
---------------------------
is there any workaround for this? i would say the not being able to use IN and NOT should be major item?
Thanks,
Shay
> Criteria API generating wrong SQL for IN clause
> -----------------------------------------------
>
> Key: HHH-6571
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6571
> Project: Hibernate Core
> Issue Type: Bug
> Components: core, entity-manager, metamodel
> Affects Versions: 3.6.6
> Environment: hibernate entity manager 3.6.6.Final(using maven), ubuntu 11,
> Reporter: shay
>
> when using the code below to generate a query
> public Predicate toPredicate(Root<Project> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
> static Integer[] ids = { 5183, 6036, 2270}
> Path<Long> id = root.get(Project_.Id);
> return builder.in(id).in((Object[]) ids).not();
> }
> it comes out as :
> select generatedAlias0 from Project as generatedAlias0 where generatedAlias0.Id in () not in (5183, 6036, 2270)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list