[midPoint] switching from SQL server to Postgres

Tony Tkacik tony.tkacik at evolveum.com
Thu Feb 29 09:28:44 CET 2024


Hi, 
what is your use case for these queries? Maybe there is better supported API for your use case instead of relying on implementation details which may change between releases. 

-- 
Anton Tkáčik
Software Developer
evolveum.com 



From: "midPoint General Discussion" <midpoint at lists.evolveum.com> 
To: "midPoint General Discussion" <midPoint at lists.evolveum.com> 
Cc: "Ashwill, Steven L" <sashwill at uillinois.edu> 
Sent: Tuesday, February 27, 2024 9:54:58 PM 
Subject: [midPoint] switching from SQL server to Postgres 



This works when using SQL server. We have this code in one of our resources to query shadow records: 



SessionFactory sqlService = (SessionFactory) SpringApplicationContextHolder.getApplicationContext().getBean("sessionFactory"); 

Session session = sqlService.openSession(); 

try{ 

Transaction tx = session.beginTransaction(); 

Query dnQuery = session.createSQLQuery(query).addScalar(" name_orig ",StandardBasicTypes.STRING); 



When we switch to the postgres(native) version I get an error that the session is not found(column name changes to nameorig ). Should this work in native mode or how do I get a session? 



As always, any help is appreciated. 





STEVEN L ASHWILL 





_______________________________________________ 
midPoint mailing list 
midPoint at lists.evolveum.com 
https://lists.evolveum.com/mailman/listinfo/midpoint 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20240229/ddf17d46/attachment.htm>


More information about the midPoint mailing list