Normalize mixin names - #229
Conversation
|
@fabien could you please provide more details? How the user code looks before the change, how will it look with this change in place, what are the benefits, etc. |
|
I am personally rather opposed to the idea of modifying identifiers here in the juggler. As far as juggler is concerned, there should be only one mixin id (name) - same as there is only one model id (name). Normalization of mixin names should happen in loopback-boot. |
|
@bajtos I actually had the normalization code in loopback-boot before. I'll move it back there then. |
|
Cool, let's close this pull request then. |
|
@bajtos turns out that rejecting this PR constrains mixin names to only be referred to by their ClassNamed naming format - that doesn't sit well with me. I prefer lower-cased, dasherized for example. So unless we do this in loopback-boot, there's no way to do this. IIRC you're able to refer to a model using different naming format? Or has this been deprecated? |
The code in modelBuilder.getModel does not seem to support that.
Well, it constrains you to refer by the same name you used when the mixin was defined.
Let's discuss this in strongloop/loopback-boot#33 then. |
See #218 - strongloop/loopback-boot#33 will be updated next.