spring-projects / spring-projects/spring-data-relational

MapingException when persisting Entity with a property as Map<String, Object> using converter Map to (bytes[]/String) [DATAJDBC-650]

Open
#867 3 comments 4 reactions 1 assignee View on GitHub

@schauder is already working on this.

Since Dec 31, 2020.

in: mapping type: enhancement
Dominant language
Java
Stars
827
Forks
394
PR merge metrics
No merged PRs in 30d

Description

B-hamza opened DATAJDBC-650 and commented

When trying to persist an Entity like : 

 

class Test {
 private final String a;
 private final Map<String, Object> b;
.... // constructor, getters
}

 

using Readind and Writing converters from Map to bytes[]. The write is OK. But when reading is KO with exception :

 

Couldn't find PersistentEntity for type class java.lang.Object!Couldn't find PersistentEntity for type class java.lang.Object!org.springframework.data.mapping.MappingException: Couldn't find PersistentEntity for type class java.lang.Object! at org.springframework.data.mapping.context.MappingContext.getRequiredPersistentEntity(MappingContext.java:79)

 


Affects: 2.1.2 (2020.0.2)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.