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