loopback icon indicating copy to clipboard operation
loopback copied to clipboard

Models base class should be selected as Persisted class by default

Open cgole opened this issue 10 years ago • 3 comments

Right now when you create an empty loopback server, by default the base class is Model and not Persisted. We should switch this so Persisted class is default

https://media.github.ibm.com/user/3069/files/c9efc7d2-15d6-11e6-9192-f81a3ab4b747

cgole avatar May 09 '16 20:05 cgole

It does not make sense to use PersistedModel as the base if no datasource is present. If you create a datasource before trying to create a model, the base will be default to PersistedModel.

raymondfeng avatar May 09 '16 22:05 raymondfeng

Closing... this is 100% intentional.

ritch avatar May 09 '16 22:05 ritch

@crandmck Do you want to add a note about this somewhere in the docs regarding scaffolding models?

superkhau avatar May 09 '16 22:05 superkhau