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

Duplicate id Rows #12

Closed
eugenkiss opened this issue Feb 23, 2016 · 2 comments
Closed

Duplicate id Rows #12

eugenkiss opened this issue Feb 23, 2016 · 2 comments

Comments

@eugenkiss
Copy link

While inspecting the generated database I noticed that there are two id rows for every table with the same content. For example, if I have the following class.

@Entity
public abstract class AbstractUser {
    @Key
    long id;
    String name;
    String profilePicUrl;
}

Then the resulting table has the following rows.

 id | id | name | profilePicUrl
--------------------------------
 1    1    Alex   http://
 2    2    Tobi   http://...
@npurushe
Copy link
Contributor

How are you retrieving the rows and column names? The database will not allow you to have to two columns with the same name so that should not be possible. Are you sure they are both named 'id'?

@eugenkiss
Copy link
Author

I was using Stetho to look at the database content, i.e. via Chrome Devtools. Thinking more about it, I assume the duplicate id rows shown are due to some presentational problem in Chrome Devtools resp. Stetho. Interestingly, Chrome Devtools shows tables created by ORMLite with both a rowid and _id (_id is the primary key), however their content is not identical. In any case, false alarm ;).

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

2 participants