objectbox-java icon indicating copy to clipboard operation
objectbox-java copied to clipboard

same property converter names conflict

Open amoikevin opened this issue 1 year ago • 1 comments

Is there an existing issue?

Build info

  • ObjectBox version: [4.0.3]
  • OS: [Android ]
  • Device/ABI/architecture: [arm64-v8a ]

Steps to reproduce

file A.kt:

class A {
     @Convert(converter = B.Converter::class, dbType = String::class)
     var b:B?=null

     @Convert(converter = C.Converter::class, dbType = String::class)
     var c:C?=null
}

class B {
     class Converter...
}

class C {
     class Converter...
}

Expected behavior

generated ACursor.java:

...
import apple.ios.watches.model.B;
import apple.ios.watches.model.C;
...
private final B.Converter bConverter = new B.Converter();
private final C.Converter cConverter = new C.Converter();
...

Actual behavior

generated ACursor.java:

...
import apple.ios.watches.model.B.Converter;
import apple.ios.watches.model.C.Converter;
...
private final Converter bConverter = new Converter();
private final Converter cConverter = new Converter();
...

Code

Code

Logs, stack traces

Logs

amoikevin avatar Nov 28 '24 04:11 amoikevin

Thanks for reporting! This likely boils down to fully supporting inner classes for converter classes as well, similar to #1006.

Internal issue objectbox-java#159

For anyone else affected, it helps us prioritize issues if you thumbs up the first post (GitHub can sort issues by thumbs ups)!

greenrobot-team avatar Dec 02 '24 08:12 greenrobot-team