ydb-platform / yoj-project

YDB ORM for Java (YOJ) is a lightweight ORM for immutable entities. It has native support for YDB and is battle-tested.
Apache License 2.0
13 stars 12 forks source link

enum DbType #28

Closed lavrukov closed 9 months ago

nvamelichev commented 9 months ago

Let's bump version in pom.xml to 2.0.0-SNAPSHOT because we've changed the API incompatibly... and also change JavaField.getDbType() to return DbType enum because we've changed the API :-)

nvamelichev commented 9 months ago

The tests fail:

[ERROR] Failures: 
[ERROR]   ColumnTest.annotatedFieldDbTypeTest:60 
Expecting ArrayList:
  ["UINT32"]
to contain only:
  ["UInt32"]
element(s) not found:
  ["UInt32"]
and element(s) not expected:
  ["UINT32"]
lavrukov commented 9 months ago

The tests fail:

[ERROR] Failures: 
[ERROR]   ColumnTest.annotatedFieldDbTypeTest:60 
Expecting ArrayList:
  ["UINT32"]
to contain only:
  ["UInt32"]
element(s) not found:
  ["UInt32"]
and element(s) not expected:
  ["UINT32"]

done

nvamelichev commented 9 months ago

Now that we return DbType.DEFAULT instead of "", one fragile test has failed:

[ERROR] tech.ydb.yoj.databind.schema.naming.ColumnTest.plainFieldTypeTest -- Time elapsed: 0.015 s <<< FAILURE!
java.lang.AssertionError: 

Expecting empty but was: [DEFAULT, DEFAULT, DEFAULT]
    at tech.ydb.yoj.databind.schema.naming.ColumnTest.plainFieldTypeTest(ColumnTest.java:52)