This is for postgresql r2dbc coroutines etc. I've got an Entity that looks like this:
@Table("entity_type")
data class EntityType(
@Id var id: UUID? = null,
val entityTypeName: Name, // A string value class
val systemSchemaVersion: SchemaVersion,
)
And a table that looks like this:
CREATE TABLE IF NOT EXISTS entity_type (
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
entity_type_name character varying NOT NULL,
system_schema_version character varying NOT NULL,
and accompanying interface:
interface EntityTypeRepository : CoroutineCrudRepository<EntityType, EntityTypeIdType> {
override suspend fun <S: EntityType> save(entity: S): EntityType
suspend fun findByEntityTypeName(entityTypeName: Name): EntityType?
I get this:
No property 'entityTypeName-9XaHgsA' found for type 'EntityType';
Why on EARTH is it appending "9XaHgsA" to the field/column name? It does this appended field stuff across ALL columns except the ID column.
Note that i'm using value classes, but that doesn't seem to cause a problem - they're automatically getting translated to strings as expected.
Related bug ticket:
https://github.com/spring-projects/spring-data-r2dbc/issues/803