ApiLogicServer-src icon indicating copy to clipboard operation
ApiLogicServer-src copied to clipboard

Stress Postgresql Yaml uses database name and not model column name

Open tylerm007 opened this issue 1 year ago • 5 comments

STRESSBIT: attributes: - label: ' description*' name: description search: true sort: true - name: bit - name: bit(1) - name: bit(2) - name: bit(3) - name: bit(4) class STRESSBIT(SAFRSBase, Base): tablename = 'STRESS_BIT' _s_collection_name = 'STRESSBIT' # type: ignore bind_key = 'None'

id = Column(Integer, primary_key=True)
description = Column(String(100))
bit = Column(BIT(1))
bit_1_ = Column('bit(1)', BIT(1))
bit_2_ = Column('bit(2)', BIT(2))
bit_3_ = Column('bit(3)', BIT(3))
bit_4_ = Column('bit(4)', BIT(4))
bit_5_ = Column('bit(5)', BIT(5))
bit_6_ = Column('bit(6)', BIT(6))
bit_7_ = Column('bit(7)', BIT(7))

tylerm007 avatar Jun 26 '24 19:06 tylerm007

Thank you for raising this issue! I'll look into it and try to help if I can.

Mizokuiam avatar Jan 09 '25 03:01 Mizokuiam

@Mizokuiam @tylerm007 Guys, can you clarify if the example above accurately represents the issue? Are you really using columns names like 'bit(1)', or am I reading this wrong?

valhuber avatar Jan 09 '25 04:01 valhuber

This is part of the stress test where we generated every postgres column name

tylerm007 avatar Jan 09 '25 11:01 tylerm007

This appears to work fine, with the following procedure:

  1. Create the Manager
  2. Open the nw_sample app
  3. Rename `ui/admin/admin.yaml'
  4. Rebuild the admin yaml: als rebuild-from-model
  5. Run the project; I am seeing the screen shot below which uses the aliased name
col alias

valhuber avatar Jan 09 '25 18:01 valhuber

@Mizokuiam

Sir, are you interested in looking at this bug? If you'd like to get in touch, great... please email us at [email protected]

valhuber avatar Jan 09 '25 18:01 valhuber