cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Petrossian (PAF)" <alexander.petross...@gmail.com>
Subject Re: Iterate thought all queries, apply template, get raw SQL
Date Tue, 13 Nov 2018 17:22:10 GMT
John,
this app was not created by me.
And I don't have it's source codes.
And these people didn't bother to declare FK or relationships in model.

And I can't make app to do 100% of queries in mappings.
Only few clicks here and there.

But thanks for the logging hint!

Alexander

вт, 13 нояб. 2018 г. в 19:28, John Huss <johnthuss@gmail.com>:

> I'm not really sure what you want.
>
> The DB should have foreign keys to define the related tables.
>
> Similarly, the Cayenne .map.xml file should have relationships defined
> between tables to indicate their relationships (via foreign keys).
>
> If you have unit tests, running those with SQL logging enabled in your
> database might help. Cayenne can also log the SQL it is generating during
> runtime, which you can enable with a log4j property like this:
>
> log4j.logger.org.apache.cayenne.log.CommonsJdbcEventLogger=INFO
>
>
> On Tue, Nov 13, 2018 at 2:25 AM Alexander Petrossian (PAF) <
> alexander.petrossian@gmail.com> wrote:
>
> > Friends, please share your vision.
> >
> > I got a project with lots of Apache Cayenne mappings (2.0), and database
> is
> > not documented at all.
> >
> > All insights about links between tables (about 2 thousands of tables) I
> can
> > get is only from queries found in Cayenne mappings (several megabytes of
> > those).
> >
> > Those tables I can quick analyse with JSQLParser. But it needs raw SQLs.
> >
> > Question: Is there some easy way to programmatically iterate through all
> > queries and apply templates to get those raw SQLs?
> >
> > (Any hints would be very appreciated!)
> >
> >
> >
> > https://github.com/JSQLParser/JSqlParser/issues/710
> >
> > https://sourceforge.net/p/jailer/feature-requests/52/
> >
> > --
> > PAF
> >
> > P.S. tried to discuss it here first:
> > https://jira.apache.org/jira/browse/CAY-2495
> >
>


-- 
PAF

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message