Skip to content

Column names in lowercase using lb4 discover method - SQL connector #3343

@sureshkodur

Description

@sureshkodur

Describe

Hi Team. I'm generating models from SQL db using lb4 discover method. But, the column names generating in lowercase. While in my SQL db, they are in camelCase. See, below code:

@property({
    type: Number,
    required: true,
    precision: 10,
    scale: 0,
    id: 1,
    mssql: 
         {"columnName":"ErrorID",
          "dataType":"int",
          "dataLength":null,
          "dataPrecision":10,
          "dataScale":0,"
          nullable":"NO"
         },
  })
  errorid: Number;

Current behavior

The column name is generated in lowercase as errorid instead of ErrorID.

Expected Behavior

  • Would like to get the column name ErrorID as it is.

Acceptance Criteria

  • column names should default to camelCase instead of lowercase
  • add a prompt of 2 options when doing lb4 discover
    • column names to property names:
      • camelCase ( LB4 default, recommended)
      • keep it the same as the column names ( warning: might cause unexpected behavior. please read the ....file)
  • enhance the documentation. List out options and their limitations.

Out of scope:

  • an extension point allowing users to provide custom function to transform database column names to LB4 property names

Metadata

Metadata

Assignees

Labels

Model DiscoveryIssues related to discovery of model definitions from (SQL) databasesdeveloper-experienceIssues affecting ease of use and overall experience of LB users

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions