" Previously I could execute StoredProcedures using this:
``` StoredProcedureQuery \r\n\r\nStoredProcedureQuery sp = em.createNamedStoredProcedureQuery( \ "otherdb.dbo.mySP \ ") \r\n //defining and setting parameters List \r\nList <?> result = sp.getResultList(); ```
After \r\n\r\nAfter upgrading to Hibernate 5.3.1.Final the Database driver throws the error: \r\n\ "The database name component of the object qualifier must be the name of the current database. \ "
I \r\n\r\nI found a workaround by using
``` Session \r\n\r\nSession session = ((Session) em.unwrap(Session.class)); session \r\nsession .doWork(work); ```
and \r\n\r\nand inside `work.execute(Connection connection)` method before doing the same as previously calling `connection.setCatalog( \ "otherdb \ ");` \r\n" |
|