Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List return all values null, except Id #37

Closed
tsuharesu opened this issue Aug 25, 2013 · 10 comments
Closed

List return all values null, except Id #37

tsuharesu opened this issue Aug 25, 2013 · 10 comments

Comments

@tsuharesu
Copy link

Hi. I have two classes that behave different. One return all values, all right when I use ListAll (or whatever other method). The other class return objects only with Id set, all other values null. I'm trying to figure out what is happening but I don't know.

Im using:

  • Sugar as a library project (is it better to use Jar?)
  • Android Annotations (but I don't think this is the problem, as the other class work)
  • Android Studio

Here is the problematic class. The subject object relationed to it is coming with everything set too. I don't know what can be wrong 😓

public class Am extends SugarRecord<Am> {
    private Float grade;
    private Integer half;
    private Subject subject;

    public Am(Context context) {
        super(context);
    }

    // getters and setters
}
@tsuharesu
Copy link
Author

I'm having this issue too: #20
Maybe that's the cause? As I said, I'm using Sugar as a library, totally updated :(

@satyan
Copy link
Collaborator

satyan commented Aug 25, 2013

@tsuharesu can you try out with primitives eg: float grade, int half.
This seems to be an issue in inflating data. https://github.com/satyan/sugar/blob/master/library/src/com/orm/SugarRecord.java#L266

I'll get around to fixing the inflate mechanism later.

@tsuharesu
Copy link
Author

Hmm, yeah. Changing to primitive types worked. Thanks!

@satyan
Copy link
Collaborator

satyan commented Aug 27, 2013

@tsuharesu You should be able to use it now with Objects as well.. not just primitives. Do try it out and let me know if that suits your purpose.

@thiagolocatelli
Copy link

This is my class

public class ApplicationAccount extends SugarRecord<ApplicationAccount> {

    private String name;
    private String service;
    private boolean defaultAccount;
    private String currencies;
    private Date created;

I am getting the same error. Removing the date field, works...

@satyan
Copy link
Collaborator

satyan commented Apr 2, 2014

can you try the latest beta.. It should be fixed there.
https://github.com/satyan/sugar/tree/master/dist

@thiagolocatelli
Copy link

I am trying, but Eclipse complains it is an invalid jar file.

@thiagolocatelli
Copy link

When are you planning to make a new release?

@satyan
Copy link
Collaborator

satyan commented Apr 2, 2014

@thiagolocatelli If you use it as a library, you'll always have the latest version. Also, there's a build file present along with source. Incase you need to build a jar out of it, you could use Ant build to do that.

As for the release, there isn't a definite plan, but sometime in the april month, we may be releasing 1.3 as a stable release.

@behi198
Copy link

behi198 commented Apr 20, 2018

I'm having this problem using version 1.5!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants