loopback-next icon indicating copy to clipboard operation
loopback-next copied to clipboard

Prompt issue by creating model with "base" argument

Open canmustu opened this issue 5 years ago • 3 comments

Steps to reproduce

I specified an option ( base ) to create model not to prompt me the question but It still prompts me for base. I tried this option by passing config file and other way which is --base entity way but same behaviour.

My config.json

{
  "base": "entity"
}

My controller creation CLI command:

lb4 model test --config config.json

Current Behavior

Prompt me to choose a base:

? Please select the model base class (Use arrow keys)
❯ Entity (A persisted model with an ID) 
  Model (A business domain object) 
  ----- Custom Models -----
  Test 

Expected Behavior

Not to prompt me about specified base.

canmustu avatar Apr 12 '21 23:04 canmustu

@canmustu, I believe it's Entity instead of entity. I tried with the following and the first prompt is asking about additional properties.

{
  "base": "Entity"
}

Hope it helps.

dhmlau avatar Apr 16 '21 01:04 dhmlau

@dhmlau base value is working now. Thanks for this but there is another problem while creating a model. 😞

You can see that problem at this link: https://github.com/strongloop/loopback-next/issues/7404

This issue has resolved and is closeable. Please close this issue when you see the link, thanks.

canmustu avatar Apr 16 '21 13:04 canmustu

Closing as resolved.

dhmlau avatar Apr 16 '21 23:04 dhmlau