Ninja-Squad / DbSetup

An API for populating a database in unit tests
http://dbsetup.ninja-squad.com/
212 stars 34 forks source link

New "DisabledBinderConfiguration" for mysql #29

Closed jotak closed 10 years ago

jotak commented 10 years ago

Hello NinjaSquad / JB

First I must congratulate you for this lib, it's easy to use and will help me a lot for writing tests on DAO. I did a small change in order not to have to repeatedly flag "use metadata" false on each insert, since I'm on a mysql database and I'll ALWAYS have to flag it to false.

So I did this small change : a new method in BinderConfiguration and a new "DisabledBinderConfiguration" class. In that way, I can set the "use metadata" flag at a more global level.

Probably there's other ways to do, please let me know if this change has some interest for you or if you'd like to do it another way.

Thanks.

Joel

jnizet commented 10 years ago

Hi jotak. I will release a new version of DbSetup very soon (probably this week-end) which addresses this issue, without breaking backward compatibility. It would be very nice of you if you tried this new feature by building DbSetup from the branch https://github.com/Ninja-Squad/DbSetup/tree/topic/smartDefaultBinder, and used it with MySQL without ever calling useMetadata(false). Please come back here and tell me if it works fine.

jotak commented 10 years ago

Yes, it works perfectly now without any manual flag. Thanks!