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
This is for postgresql.
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, // another string value class
)
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 : CrudRepository<EntityType, EntityTypeIdType> {
fun <S: EntityType> save(entity: S): EntityType
fun findByEntityTypeName(entityTypeName: Name): EntityType?
I get this:
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property 'entityTypeName-9XaHgsA' found for type 'RuleType'
at app//org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:91)
at app//org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:438)
at app//org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:414)
at app//org.springframework.data.mapping.PropertyPath.lambda$from$0(PropertyPath.java:367)
at java.base@17.0.4/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330)
at app//org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:349)
at app//org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:332)
at app//org.springframework.data.repository.query.parser.Part.<init>(Part.java:81)
Why on EARTH is it appending "9XaHgsA" to the field/column name? It does this 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.
Also, note that this process goes through with the normal names first - I've stepped through in debugger - but then starts appending the 7 digit suffix for some reason second go-around.
The text was updated successfully, but these errors were encountered:
grice-globality
changed the title
Field/column names getting appended with random six letters, causing entity mapping and query projection to fail
Field/column names getting appended with a dash and 7 characters, causing entity mapping and query projection to fail
Nov 22, 2022
This is for postgresql.
I've got an Entity that looks like this:
And a table that looks like this:
and accompanying interface:
I get this:
Why on EARTH is it appending "9XaHgsA" to the field/column name? It does this 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.
Also, note that this process goes through with the normal names first - I've stepped through in debugger - but then starts appending the 7 digit suffix for some reason second go-around.
The text was updated successfully, but these errors were encountered: