From: | negora <public(at)negora(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Off-topic? How to extract database statements from JPA? |
Date: | 2022-10-31 12:27:51 |
Message-ID: | 500f47cd-411c-108b-f23e-04ef613a0927@negora.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Gus:
JPA (Jakarta Persistence API; previously known as Java Persistence API)
is "just" the specification. There are several implementations of this.
The reference implementation is EclipseLink, but there are others widely
used such as Hibernate or OpenJPA. You should ask which one is being
used in your company.
The SQL code is generated on the fly, so there is no place where it's
stored. However, there are ways to view what SQL is generated in real
time. For example, with Hibernate, you can change the level of the
"org.hibernate.SQL" logger to "DEBUG", and view what happens behind the
scenes.
You could also enable the logging in the PostgreSQL server-side and see
what's happening.
Best regards.
On 31/10/2022 11:50, Gus Spier wrote:
> I apologize if this is off-topic, but I've become exceedingly
> frustrated and need help.
>
> The assignment is to evaluate SQL code for an application that has
> been built with Java Springer Persistence API and, if appropriate,
> offer suggestions to improve database performance.
>
> The problem is that I am not a Java guy. I can usually read code and
> determine what it is trying to do. But here, I am at a loss. Where
> does the JPA hide the SQL code? I do not really expect a definitive,
> explicit answer, but if anybody could point me to documentation or a
> working aid that lays out where the JPA stores the DDL and DML, I
> would be truly grateful.
>
> Thanks in advance.
>
> Gus
From | Date | Subject | |
---|---|---|---|
Next Message | Erika Knihti-Van Driessche | 2022-10-31 14:18:23 | Alfresco and postgres schemas |
Previous Message | Erik Wienhold | 2022-10-31 12:19:34 | Re: Off-topic? How to extract database statements from JPA? |