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.

[0.9.13] Kotlin app build fails with ToOne relation

See original GitHub issue

My app bild fails whenever I add ToOne relation to my class with following error

* What went wrong:
Execution failed for task ':mdd_tester:transformClassesWithObjectBoxAndroidTransformForResearchDebug'.
> Could not transform entity class "com.rbot.mdd.tester.chat.Message" (cannot find com.stfalcon.chatkit.commons.models.IUser)

What strange is that IUser class that it seems to not be able to find is not the target relation of ToOne class and is just a filed in my entity class that I use with PropertyConverter. Here is the fields of my entity class:

    @Id var id: Long = 0
    @Convert(converter = UserConverter::class, dbType = String::class)
    lateinit var user: IUser
    @Transient
    var report: Report? = null                         // Manual relation
        get() = if (reportId > 0) DataManager.reportBox[reportId] else null
        set(value) = value?.let {
            field = it
            field?.persist()
            reportId = it.reportId
        } ?: Unit
//    lateinit var report2: ToOne<Report>    Build fails if this line is not commented
    var reportId = -1L
    var text = ""
    var image = byteArrayOf()
    var date = Date(now)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
greenrobotcommented, Aug 14, 2017

Yes, that was expected. Will have a .15 shortly…

0reactions
greenrobotcommented, Aug 21, 2017

@arnis71 @lzhAndroid 0.9.15 is out - please verify that this fixes your issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Kotlin - Error when using one to many entity relationship
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with...
Read more >
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter aacgain 1.8 AAC‑supporting version of mp3gain aalib 1.4rc5 Portable ASCII art graphics library aamath 0.3 Renders mathematical expressions as ASCII art
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix the issue for the current project, click Run > Edit Configurations and change the default JUnit configuration to only include the...
Read more >
Build fails with Unresolved reference when enabling view ...
Issue summary · 1. Build cache enabled in gradle. · 2. Rename a top level package. · 3. Clean and build, Viewbinding classes...
Read more >
Troubleshooting - ObjectBox Docs
Resolve any other build errors. Check that the project is configured correctly. E.g. for Kotlin, check that the kapt plugin is applied (...
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