Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
312 views
in Technique[技术] by (71.8m points)

database - How to set Schema in mybatis for IRIS databse

My Intersystem IRIS database contains multiple schema i.e. Each Developer has his own Schema. While accessing database from Spring boot application I am getting following error:

 [SQLCODE: <-30>:<Table or view not found>]
[Location: <Prepare>]
[%msg: < Table 'SQLUSER.ACCOUNT' not found>]; nested exception is java.sql.SQLException: [SQLCODE: <-30>:<Table or view not found>]
[Location: <Prepare>]
[%msg: < Table 'SQLUSER.ACCOUNT' not found>]"

This is due to that fact that I am not able to specify schema before table name. If I hard code it as schema.table_name in code then the code is working fine.

Is there any way to set this Schema at global level through properties files for mybatis.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Unfortunately, there is no way to specify a current schema for the session. In InterSystems products supposed to use schema names all the time in all queries. And default schema for the whole system can be changed in settings.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...