sockeqwe / sqlbrite-dao

DAO for SQLBrite
http://hannesdorfmann.com/android/sqlbrite-dao
Apache License 2.0
182 stars 22 forks source link

Fix mapping of methods which have parameter types of String, Date or byte[] #4

Closed JamesGay closed 9 years ago

JamesGay commented 9 years ago

Previously, an annotated method with a parameter type of String, Date or byte[] would fail with exception.

@Column(COL_FIRSTNAME)
public void setFirstname(String firstName) {
    this.firstname = firstname;
}
Error:(38, 15) error: Unsupported type java.lang.String as parameter...

This was caused by MethodCodeFactory using the method type (return type?) instead of the parameter type.

There was also a closing bracket missing when generating ContentValues builder methods for Date fields.

sockeqwe commented 9 years ago

Thanks!

sockeqwe commented 9 years ago

I have release your fix in 0.2.2. May takes some hours to be synced with maven central

JamesGay commented 9 years ago

Awesome - thanks :)