Re: Off-topic? How to extract database statements from JPA?

Поиск
Список
Период
Сортировка
От negora
Тема Re: Off-topic? How to extract database statements from JPA?
Дата
Msg-id 500f47cd-411c-108b-f23e-04ef613a0927@negora.com
обсуждение исходный текст
Ответ на Off-topic? How to extract database statements from JPA?  (Gus Spier <gus.spier@gmail.com>)
Список 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



В списке pgsql-general по дате отправления:

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: Off-topic? How to extract database statements from JPA?
Следующее
От: Erika Knihti-Van Driessche
Дата:
Сообщение: Alfresco and postgres schemas