SQL : Bean class code generation

Bug #604727 reported by Timo Westkämper on 2010-07-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Changed in querydsl:
status: New → In Progress
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Here is a test case :

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

    public void Insert_Update_Query_and_Delete(){
        // Insert
        Employee employee = new Employee();
        Integer id = insert(e).populate(employee).executeWithKey(e.id);

        // Update
        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());

Changed in querydsl:
status: In Progress → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 1.9.1

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers