loopbackio / loopback-connector-oracle

Connect Loopback to Oracle
http://loopback.io/doc/en/lb3/Oracle-connector.html
Other
28 stars 30 forks source link

LoopBack Discover-Schema Created Incorrect Type #144

Closed telkomops closed 6 years ago

telkomops commented 7 years ago

node bin\discover-schema.js to oracle generates the property type incorrectly. Oracle 11g R2 , Table has schema with CLOB. As per lb3 documentation CLOB should be mapped to buffer object. discover-schema.js maps the CLOB to binary which is not recognized by Swagger.

jannyHou commented 7 years ago

@telkomops Could you follow the template in https://github.com/strongloop/loopback-connector-oracle/issues/new and provide us a sandbox to reproduce the problem? Thanks.

And I am confused what does "bin\discover-schema.js" mean? where does the file come from?

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 6 years ago

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

ge-gao commented 3 years ago

with lb4 discover I got the same issue. After the model of an Oracle table gets generated, the CLOB type column is set to type Binary.

  @property({
    type: 'Binary',
    length: 4000,
    oracle: {columnName: 'IMPRINT', dataType: 'CLOB', dataLength: 4000, dataPrecision: null, dataScale: null, nullable: 'Y'},
  })
  imprint?: Binary;

This is shown as validation error:

Cannot find name 'Binary'.ts(2304)
Public property 'imprint' of exported class has or is using private name 'Binary'.ts(4031)
bajtos commented 3 years ago

Support for Binary type in LB4 is discussed in https://github.com/strongloop/loopback-next/issues/6295 and https://github.com/strongloop/loopback-next/pull/6476