【发布时间】:2022-01-15 21:31:33
【问题描述】:
我有 kotlin 和 Micronaut 应用程序使用 r2dbc 连接到 postgresql 以进行响应式方法
r2dbc:
datasources:
default:
schema-generate: NONE
dialect: POSTGRES
url: r2dbc:postgresql://localhost:5434/mydb
username: postgres
password: postgres
我在数据库mydb 和架构myschema 中有一个名为Customer 的表,但是在使用@MappedEntity 时,我们只能定义表名。由于表在myschema 内部,因此应用程序抛出实体不存在
15:26:15.455 [reactor-tcp-nio-1] 错误 i.m.h.n.stream.HttpStreamsHandler - 写入流响应时出错:关系“客户”不存在 io.r2dbc.postgresql.ExceptionFactory$PostgresqlBadGrammarException: 关系“客户”不存在
如何在MappedEntity注解中定义模式名?
【问题讨论】:
标签: postgresql kotlin micronaut r2dbc