Chronos team,

I am looking at PersonServiceTest, and see for instance the following code;

    PersonEntity p = personService.newInstance( unitOfWork );
    p.name().set( "test" );
    p.item().set( item );
    personService.save( p );

This is a very good example of anti-pattern.

It should simply be;

    PersonEntity p = unitOfWork.newEntity( PersonEntity.class );
    p.name().set( "test" );
    p.item().set( item );


My guess this is old code, but can we please start killing off all
XyzService that tries to be some DAO layer??


Cheers
Niclas

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to