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

Better error message #1567

Closed
douglasalipio opened this issue Apr 17, 2018 · 2 comments
Closed

Better error message #1567

douglasalipio opened this issue Apr 17, 2018 · 2 comments
Assignees
Milestone

Comments

@douglasalipio
Copy link

DBFlow Version: 4.2.4

Bug or Feature Request: Change an error message

Description:
When you create a data class with a default constructor and not initialize the parameters like this:

@Table(name = "standard", database = AppDatabase::class)
class Standard constructor(
        @PrimaryKey(autoincrement = true)
        @Column(name = "id")
        var id: Long,

        @Column(name = "question_text")
        var questionText: String) : BaseRXModel()

you'll get the message:

e: error: ==========class com.raizlabs.android.dbflow.processor.TableValidator :Table must provide a visible, default constructor.==========

But the problem isn't about providing a visibility for the constructor, the problem is set a default value for the parameters of the constructor as @agrosner mentioned in this issue

@agrosner
Copy link
Owner

yes. dbflow does not yet support non-default constructors. this would be nice to implement, given time. I will look at other libraries and see how they solve this. It might require some significant changes to generated code as currently it direct assigns to an object.

@agrosner agrosner added this to the 5.0.0 milestone Oct 21, 2018
@agrosner agrosner self-assigned this Oct 21, 2018
@agrosner
Copy link
Owner

For now the message will change

@agrosner agrosner modified the milestones: 5.0.0, 5.0.0-alpha2 Feb 21, 2021
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