I have a sql server database with a table containing an xml column.
I'm begining with reactive programming with spring boot webflux / r2dbc.
When tying to retrieve data from the table I got an exception.
Caused by: java.lang.NullPointerException: value
It seems that the xml data type is not yet supported by the driver https://github.com/r2dbc/r2dbc-mssql
If I change the xml type to nvarchar(50) it's working. But I cannot change that.
So ... is there a solution or do I have to should i give up using r2dbc ?
I tried with using an explicit query in my repository like suggested by @Larnu. But do not forget to put an alias on the cast
@Query("select ..., cast(MyXML as nvarchar(max)) as myXmlAsString from ... where ...")
AND
use that alias in the "entity"
@Column("myXmlAsString") private String xml;