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

@Entity name must match class name #9

Open
gonemad opened this issue Jan 19, 2024 · 0 comments
Open

@Entity name must match class name #9

gonemad opened this issue Jan 19, 2024 · 0 comments

Comments

@gonemad
Copy link

gonemad commented Jan 19, 2024

When creating tables.. the tableName needs to match the class name or it will throw a runtime error when you try to insert into the database. The database does get created fine from what i saw, but inserts fail

Works:

@Entity(tableName = "ChannelEntity")
data class ChannelEntity(var name: String = ""

Doesnt work

@Entity(tableName = "channel")
data class ChannelEntity(var name: String = ""

I dont have the exact exception.. but it was in an InvalidationTracker and it was complaining about a table not being found (it listed the name of the class instead of the name i gave the table)

Support for tableName = "something other than class name" would be appreciated as that is supported in Room

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

1 participant