Community
Participate
Working Groups
Build Identifier: eclipselink-2.3.0.v20110604-r9504 Using the entity: @Entity @Table(name="CUSTOMER_TABLE") public class Customer implements java.io.Serializable { // Instance variables private String id; private String name; public Customer() { } public Customer (String id, String name) { this.id = id; this.name = name; } @Id @Column(name="ID") public String getId() { return id; } public void setId(String v) { this.id = v; } @Column(name="NAME") public String getName() { return name; } public void setName(String v) { this.name = v; } } ---------------------- Using the client code: CriteriaBuilder qbuilder = em.getCriteriaBuilder(); et.begin(); CriteriaQuery<Tuple> cquery = qbuilder.createTupleQuery(); Root<Customer> cust = cquery.from(Customer.class); EntityType<Customer> Customer_ = cust.getModel(); Selection[] s = {cust.get("id"), cust.get("name")}; System.out.println("Testing tuple"); try { qbuilder.tuple(qbuilder.tuple(s)); System.out.println("Did not throw IllegalArgumentException"); } catch (IllegalArgumentException iae) { System.out.println("Received expected IllegalArgumentException"); } catch (Exception e) { System.out.println("Received unexpected exception", e); } System.out.println("Testing array"); try { qbuilder.tuple(qbuilder.array(s)); System.out.println("Did not throw IllegalArgumentException"); } catch (IllegalArgumentException iae) { System.out.println("Received expected IllegalArgumentException"); } catch (Exception e) { System.out.println("Received unexpected exception", e); } et.commit(); Reproducible: Always
output: Testing tuple Did not throw IllegalArgumentException Testing array Did not throw IllegalArgumentException
Updating target milestone.
the patch for 366100 will fix this issue as well *** This bug has been marked as a duplicate of bug 366100 ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink