ActiveAndroid icon indicating copy to clipboard operation
ActiveAndroid copied to clipboard

Date TypeSerializer returning null

Open orira opened this issue 13 years ago • 0 comments

Hi

I'm not sure what I've done wrong, but I've started a new project with this great Library.

Simple Model below

@Table(name = "Child")
public class Child extends Model {

@Column(name = "FirstName")
public String firstName;

    @Column(name = "DateOfBirth")
 public java.util.Date dateOfBirth; 
}

and I'm persisting like so

Child child = new Child();
child.firstName = "foo";
child.dateOfBirth = new java.util.Date():
child.save();

This works fine

But on retrieving like below

public static List<Child> findAllChildren() {
    return new Select().from(Child.class).execute();
}

I get my child back, but the dateOfBirth is null. Any idea of what I could be doing wrong? I'm using the latest build 3.1.Snapshot.jar

Thanks

orira avatar Nov 27 '13 08:11 orira