Comment 1 for bug 604727

Here is a test case :

    private QEmployee e = new QEmployee("e");

    @Test
    public void Insert_Update_Query_and_Delete(){
        // Insert
        Employee employee = new Employee();
        employee.setFirstname("John");
        Integer id = insert(e).populate(employee).executeWithKey(e.id);
        employee.setId(id);

        // Update
        employee.setLastname("Smith");
        assertEquals(1l, update(e).populate(employee).where(e.id.eq(employee.getId())).execute());

        // Query
        Employee smith = query().from(e).where(e.lastname.eq("Smith")).uniqueResult(e);
        assertEquals("John", smith.getFirstname());

        // Delete (no changes needed)
        assertEquals(1l, delete(e).where(e.id.eq(employee.getId())).execute());
    }

And to create the bean classes do this :

MetaDataExporter exporter = new MetaDataExporter(namePrefix, "test", null, null, new File(target), namingStrategy, serializer, new BeanSerializer());
exporter.export(connection.getMetaData());