*/
public class TupleCriteriaTest extends AbstractMetamodelSpecificTest {
public void testArray() {
EntityManager em = factory.createEntityManager();
em.getTransaction().begin();
Customer c1 = new Customer();
c1.setId( "c1" );
c1.setAge( 18 );
c1.setName( "Bob" );
em.persist( c1 );
em.getTransaction().commit();
em.close();
em = factory.createEntityManager();
em.getTransaction().begin();
final CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Object[]> q = cb.createQuery(Object[].class);
Root<Customer> c = q.from(Customer.class);
q.select( cb.array( c.get(Customer_.name), c.get(Customer_.age) ) );
List<Object[]> result = em.createQuery(q).getResultList();
assertEquals( 1, result.size() );
assertEquals( c1.getName(), result.get( 0 )[0] );
assertEquals( c1.getAge(), result.get( 0 )[1] );
em.getTransaction().commit();
em.close();
em = factory.createEntityManager();
em.getTransaction().begin();