Adding Schema name to entity in Spring data?

前端 未结 2 1686
终归单人心
终归单人心 2021-01-19 09:54

I am getting an error when using an Oracle DB and Spring Data. The error is:

ORA-00942: table or view does not exist
相关标签:
2条回答
  • 2021-01-19 10:45

    The @Table annotation provides the schema attribute:

    @Table(name = "Dog", schema = "Vet")
    
    0 讨论(0)
  • 2021-01-19 10:51

    You must prefix your tables with the schema name and with a . inbetween them:

    @Table(name = "VET.Dog")
    
    0 讨论(0)
提交回复
热议问题