[hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-6571) Criteria API generating wrong SQL for IN clause
Strong Liu (JIRA)
noreply at atlassian.com
Tue Aug 30 11:09:02 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Strong Liu reassigned HHH-6571:
-------------------------------
Assignee: Strong Liu
> 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
> Assignee: Strong Liu
>
> 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