You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used PonyORM with an Oracle provider and found that it does not support the CHAR type of ORACLE well.
For example, I have a field whose type is CHAR(15). When I fill it up with the value 1234567890 after saving it into this field, the Oracle will add padding space after the value, like '1234567890 '.
If I use other SQL tools to search with this field as the condition, there is no need to add padding space after the value, but PonyORM can not. For example:
# Model definitionclassItem(db.Entity):
_table_='ITEMM'fitemno=PrimaryKey(str, 15, autostrip=False)
fitemtyp=Required(str, 1)
# running result: can not find the record
GET CONNECTION
SELECT "x"."FITEMNO", "x"."FITEMTYP"
FROM "ITEMM""x"
WHERE "x"."FITEMNO" = :p1
{'p1':'0035931-3'}
COMMIT
RELEASE CONNECTION
# running result: can find the record.
GET CONNECTION
SELECT "x"."FITEMNO", "x"."FITEMTYP"
FROM "ITEMM""x"
WHERE "x"."FITEMNO" = :p1
{'p1':'0035931-3 '}
Item['0035931-3']
COMMIT
RELEASE CONNECTION
I used PonyORM with an Oracle provider and found that it does not support the CHAR type of ORACLE well.
For example, I have a field whose type is CHAR(15). When I fill it up with the value 1234567890 after saving it into this field, the Oracle will add padding space after the value, like '1234567890 '.
If I use other SQL tools to search with this field as the condition, there is no need to add padding space after the value, but PonyORM can not. For example:
The first case
The second case
and I found if I use textual value, no problem
I want to know how to solve this issue, is there any parameter can solve my question?
The text was updated successfully, but these errors were encountered: