Closed enricop89 closed 7 years ago
While I am not familiar with the mysql connector code myself, it looks like the "discovery" query does not include any information about the default
value - see lib/discovery.js#L159-L186.
@enricop89 I think this should be an easy change, would you like to contribute it yourself?
Closing this.
Duplicate of https://github.com/strongloop/loopback-connector-mysql/issues/320
Description/Steps to reproduce
Hi all,
I am using the dataSource API discoverSchema.. Everything works well except for one thing... the model produced doesn't contain the default value (only for certain type of data). It seems like the API doesn't read the default property from Db.
Example:
Table 'COMPANY':
The default value for the field 'logo' is not imported in the Model.json created. Same thing for the creation date, I expected the json with the defaultFn: 'now' but the API doesn't do it.
I am using Node 6.9.2, Loopback 3.2.1, Loopback my sql connector 2.4.1, loopback-datasource-juggler 3.2.0