[midPoint] switching from SQL server to Postgres

Ashwill, Steven L sashwill at uillinois.edu
Tue Mar 5 21:20:23 CET 2024


Found a solution by adding a helper bean to the context and calling an external method in it, but I would prefer an API or native solution you might say for the reason you said.
Our use case is that one of the AD managers at a university in our system will move employees and students to an ou=”To Be Deleted” before midpoint is told about it.  This is our attempt to find the matching records in the shadows so that midpoint doesn’t try to insert the record again on a reconcile.  Unfortunately it does not work all the time.

From: Tony Tkacik <tony.tkacik at evolveum.com>
Sent: Thursday, February 29, 2024 2:29 AM
To: midPoint General Discussion <midpoint at lists.evolveum.com>
Cc: midPoint General Discussion <midPoint at lists.evolveum.com>; Ashwill, Steven L <sashwill at uillinois.edu>
Subject: Re: [midPoint] switching from SQL server to Postgres

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<mailto:midpoint at lists.evolveum.com>>
To: "midPoint General Discussion" <midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>>
Cc: "Ashwill, Steven L" <sashwill at uillinois.edu<mailto: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<mailto:midPoint at lists.evolveum.com>
https://lists.evolveum.com/mailman/listinfo/midpoint<https://urldefense.com/v3/__https:/lists.evolveum.com/mailman/listinfo/midpoint__;!!DZ3fjg!_V_g3XFQ5JEpV4oDAluCNPdoxZbPp-ThwPrB9xN0ybAxVYLbNsKrKq9wm33lhbe8hr8CtNK4aH3j0qT2y5-xosLK6P0$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20240305/8ff670aa/attachment.htm>


More information about the midPoint mailing list