Giter Club home page Giter Club logo

Comments (4)

satyan avatar satyan commented on July 21, 2024

Can you post your Conversation class too.. or see what's the difference between those two classes..

from sugar.

sigeje avatar sigeje commented on July 21, 2024

ah, I see the difference, I declare an attribute called id as Long in Conversations class, but I didn't declare it in Messages class. I've try to remove public Long id, and it's successfully work. Why it's error if we declare Long id in SugarRecord subclass Sir ?

Message class :
public class Messages extends SugarRecord {

public String body;
public String date;
public String category;
public String type;

public Conversations conv;

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

public Messages(Context context, String body,
        String date, String category, String type, Conversations conv) {
    super(context);
    this.body = body;
    this.date = date;
    this.category = category;
    this.type = type;
    this.conv = conv;
}

}

Conversations class :
public class Conversations extends SugarRecord {

//public Long id; <- it causes an error
public String snippet;
public String recipient;
public String date;

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

public Conversations(Context context, String snippet, String recipient, String date) {
    super(context);
    this.snippet = snippet;
    this.recipient = recipient;
    this.date = date;
}

}

from sugar.

satyan avatar satyan commented on July 21, 2024

ok. There's a similar property "Long id" defined in the SugarRecord class too. During reflection, it seems to cause a conflict.

from sugar.

sigeje avatar sigeje commented on July 21, 2024

thanks Sir :)

from sugar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.