Closed sebastian-x86 closed 3 years ago
Hey @Linuem thank you for the issue report, I'll take a lot and then return later today.
Hey @libingw I found the issue:
Hope, we'll release a new version with these fixes next month.
@otaviojava What about the MicroProfile issue, do you expect that to be resolved next month?
Good Morning @otaviojava, this sounds pretty great!
Would be great to see a release next month. I think jnosql brings great value for nosql databases.
Currently I am using an ugly workaround with a custom converter:
public class MapConverter implements AttributeConverter<Map<String, Object>, String> {
@Override
public String convertToDatabaseColumn(Map<String, Object> stringObjectMap) {
// TODO error handling (-:
return new ObjectMapper().writeValueAsString(stringObjectMap);
}
@Override
public Map<String, Object> convertToEntityAttribute(String dbValue) {
// TODO error handling (-:
return new ObjectMapper().readValue(jsonString, new TypeReference<Map<String, Object>>() {});
}
}
But this is of course not the best solution as I have not all CouchDb features when using serialized json.
Hey @Linuem , it is available as 1.0.0-SNAPSHOT. Could you try with this version just to check if we fix the bug properly?
Hi @otaviojava,
Yes, I would like to test it! From which maven repository is this available?
My maven resolves it to oss.sonatype.org but when I look at the pom it tells me that its date is not of today.
<metadata modelVersion="1.1.0">
<groupId>org.eclipse.jnosql.diana</groupId>
<artifactId>couchdb-driver</artifactId>
<version>1.0.0-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20201011.150225</timestamp>
<buildNumber>13</buildNumber>
</snapshot>
<lastUpdated>20201018132605</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<classifier>javadoc</classifier>
<extension>jar</extension>
<value>1.0.0-20201011.150225-13</value>
<updated>20201011150225</updated>
</snapshotVersion>
<snapshotVersion>
<classifier>sources</classifier>
<extension>jar</extension>
<value>1.0.0-20201011.150225-13</value>
<updated>20201011150225</updated>
</snapshotVersion>
<snapshotVersion>
<extension>jar</extension>
<value>1.0.0-20201011.150225-13</value>
<updated>20201011150225</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>1.0.0-20201011.150225-13</value>
<updated>20201011150225</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>
Best Regards, Sebastian
@Linuem
We had an issue with the name, but briefly, we're not enabled to use "Artemis" and "Diana" anymore. Instead of that, we replaced "communication" and "mapping" in the respective order.
Hi @otaviojava,
I just had the chance to test the snapshot version and it works great!
I had some serious issues with my applicationserver (openliberty) because it was complaining that all jakarta.nosql.* classes could not be found. I had to add them separately in my server.xml with:
...
<webApplication location="app.war" contextRoot="/">
<classloader apiTypeVisibility="spec, ibm-api, api, stable, third-party" commonLibraryRef="Lib"/>
</webApplication>
<!-- WORKAROUND because openliberty will throw classnotfound exceptions for all jakarta.nosql.* classes -->
<library id="Lib" apiTypeVisibility="spec, ibm-api, api, stable, third-party">
<fileset dir="/home/xxx/Desktop/temp" includes="*.jar" scanInterval="5s" /> <!-- directory includes all jakarta deps -->
</library>
...
I think this is related to openliberty but I am not that deep into openliberty. They are packaged in my war file but not found.
A further minor suggestion would be to add a bom :-)
From my point of view the main issue with HashMap is fixed.
Hey @Linuem we've released the sp3 version. I'll close this issue, please, let me know if the issue persist.
Hi,
I currently have an issue with mapping a HashMap<String, Object> in Columns. It is possible to write the map into my couchdb database but I receive an error when reading it.
Java Version: 11.0.5 Applicationserver Version (OpenLiberty): 20.0.0.2
JNOSQL Version:
Entity:
Write and read entity:
Document in Database
Error messages: There is not supported convertDocument{name='hallo', value=DefaultValue{value=Welt}} a not Map type.
Is this the correct way to handle HashMaps?
Best Regards Sebastian