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

Resolve Plural Type in annotation #215

Open
aggarwalpulkit596 opened this issue May 14, 2019 · 3 comments
Open

Resolve Plural Type in annotation #215

aggarwalpulkit596 opened this issue May 14, 2019 · 3 comments

Comments

@aggarwalpulkit596
Copy link

@Type("instructors")
open class Instructor : BaseModel() {
    @JvmField
    var name: String? = null
    @JvmField
    var description: String? = null
    @JvmField
    var photo: String? = null
    @Relationship("courses", resolve = true)
    @JvmField
    var courses: ArrayList<Course>? = null
    @JvmField
    var instructorCourse: InstructorCourse? = null
}

@Type("instructor")
class InstructorSingle : Instructor()

type with plural names are not handled on the app but on server json-api automatically resolve "instructor" and "instructors" to the same model

@aggarwalpulkit596
Copy link
Author

@jasminb is there any option to resolve this or i have to create 2 separate models for this

@aggarwalpulkit596
Copy link
Author

@aggarwalpulkit596
Copy link
Author

@jasminb any update on this its quite frustrating to make duplicate models

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