Closed ConstNW closed 4 years ago
Can I ask what's the use case?
manually declare relation key to use it value by own purposes
I see, but we should check that the existing field is compatible with what we need.
What it is for? I suppose If you manually defining relation key then you should care about everything related to it
I suppose If you manually defining relation key then you should care about everything related to it
If the collision is intentional, I can see your point. But the relKey
is used by the generated getter and setter, and I imagine that if the user has chosen to use a @:relation
, he still expects them to work.
And what about accidental collisions?
@jonasmalacofilho take a look on changes please
Looks good to me, and the tests pass (even though for some reason Travis has stopped updating the commit/PR status).
Thank you @ConstNW.
Possible regression introduced with this PR, see https://github.com/HaxeFoundation/record-macros/issues/57
@emugel I think you're right.
don't create field for relation if it already exists