Closed PierreLeresteux closed 9 years ago
I understand your motivation, but this would make DbSetup much more complex and would slowly change it to some kind of ORM, needing all kinds of choices to be made:
I'd prefer not to embed this in DbSetup.
You could add a Map<String, Object> toDbSetupMap()
method to your class and simply do
insertInto("class")
.columns("a","b","c")
.values(myClass.toDbSetupMap())
.build();
Hi and thanks for your reply ...
I understand your point of view and I'm agree, I'll try to use your recommandation. :v:
Have a nice day.
I create a new method in the Insert builder to generate row using an object instead of giving a Map of list of values. I do this, because, I use a lot DbSetup, and sometimes I like to create object to have better assertions.
I do something like that now :
Because in my assertions I can have this :
I made this PR to have this :