public void testUpdateNoQualifierToOne() throws Exception {
createThreeArtistsTwoPaintings();
Artist object = Cayenne.objectForPK(context, Artist.class, 33003);
EJBQLQuery check = new EJBQLQuery("select count(p) from Painting p "
+ "WHERE p.toArtist <> :artist");
check.setParameter("artist", object);
Object notUpdated = Cayenne.objectForQuery(context, check);
assertEquals(new Long(2l), notUpdated);
String ejbql = "UPDATE Painting AS p SET p.toArtist = :artist";
EJBQLQuery query = new EJBQLQuery(ejbql);
query.setParameter("artist", object);
QueryResponse result = context.performGenericQuery(query);
int[] count = result.firstUpdateCount();
assertNotNull(count);