There is no simple way to do this. Perhaps you can log an enhancement request.
You could do this by creating your own EclipseLink SessionLog to capture the SQL, and create your own fake JDBC Connection to not access the database (I think we even have one in testing somewhere). One of the issues will be reading objects and generating sequence numbers, as these need to access the database.
rgn wrote:
Hi All,
We're currently using EclipseLink and working on migration data.
We're trying to find out if it is even possible to have EclipseLink generate
the INSERT statement for us and store it to a file without persisting to any
database?
So we want just to capture all the insert statements and put it in a file
and use it later.
We're using the Classic API and the case is for new objects and write only.