Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Eclipse Link: Create Tables Query

There is no way to have EclipseLink generate the column definitions in a specific order. Your best bet is to be specific about what you are selecting in your sql.

i.e. "select column2, column1, column3....." instead of "select * ....."

If you really want to affect the order, you can set the ddl-generation type to "sql-script" and edit the script that is output.


Venu Gattineni wrote:

I am using below property to generate tables and columns in the database.

<property name=/"eclipselink.ddl-generation"/ value=/"create-tables"/ />

Tables are columns are getting created correctly. But the order of columns in table is not as expected by me. How set the order of the columns.

Ex: I created an EmployeeTable Object with properties ‘empId, empName, empSalary’. But the columns created in the order ‘empId, empSalary, empName’

The expected order is ‘empId, empName, empSalary’

Can any one sguuest me on how to get the columns in an expected order.

Best Regds,



VENU GATTINENI | Team Lead | JaMochaTech Pvt. Ltd. | Address:#730, 2nd Floor, 3rd Block, Koramangala, Bengaluru-560034 | M: +91 9980515319


eclipselink-users mailing list

Back to the top