question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I try to use object Relationships, but always get “no such column: noteTags”

My code:

public class NoteWord extends SugarRecord<NoteTag> {
    public static final String TAG = "Note_Word";
    public String chinese;
    public String nihongo;
    public String pron;
    public int star;
    public NoteTag noteTags;
    public NoteWord(){
    }

    public NoteWord(String chinese,String nihongo,String pron,int star,NoteTag tags){
        this.chinese = chinese;
        this.nihongo = nihongo;
        this.pron = pron;
        this.star = star;
        this.noteTags = tags;
    }
}
public class NoteTag extends SugarRecord<NoteTag> {
    public static final String TAG = "NoteTag";
    String tagName;
    public NoteTag() {
    }
    public NoteTag(String tagName) {
        this.tagName = tagName;
    }
    public void setTagName(String name) {
        tagName = name;
    }
    public String getTagName() {
        return tagName;
    }
}
 NoteWord.find(NoteWord.class, "noteTags = ?", tags.get(i).getId()+"");

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7

github_iconTop GitHub Comments

12reactions
Jakevincommented, Aug 9, 2014

…Find !! Sugar ORM with autotrans 「lower camel case」to 「lower camel case+ under Line…」 so

 NoteWord.find(NoteWord.class, "noteTags = ?", tags.get(i).getId()+"");

must use

 NoteWord.find(NoteWord.class, "note_Tags = ?", tags.get(i).getId()+"");
6reactions
romangromovcommented, Aug 24, 2015

This should be added to official documentation…

Read more comments on GitHub >

github_iconTop Results From Across the Web

OperationalError, no such column. Django - Stack Overflow
Exception Value: no such column: snippets_snippet.owner_id ... It renewed the database and fixed the issues without affecting my project.
Read more >
No such column when column exists - sqlite
I have a table ( trackedinfo ) inside my database that has the following columns (columns obtained by running ...
Read more >
Django : OperationalError, no such column. Django - YouTube
Django : OperationalError, no such column. Django [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Django ...
Read more >
Django refusing to make migrations. OperationalError - Reddit
OperationalError: no such column. Hi! I had this model. There's already data in there. It's working fine and deployed and everything.
Read more >
Salesforce - Resolve error "No such column 'X' on entity 'X'.
Issue: Endpoint requests using the Salesforce connector fail with: No such column 'Billingstreet' on entity 'Account'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found