views:

14

answers:

1

EclipseLink normally generates SQLs like:

SELECT t0.ID, t1.NAME FROM MAN t0, WIFE t1 WHERE t0.ID = t1.MAN_ID

Is it possible to tell EclipseLink, that it should use full table names for aliases to make the query more readable?

SELECT t0_MAN.ID, t1_WIFE.NAME FROM MAN t0_MAN, WIFE t1_WIFE WHERE t0_MAN.ID = t1_WIFE.MAN_ID

I think Hibernate has a similar feature.

+1  A: 

No, EclipseLink will always use short aliases. But if there isn't a join then it will avoid aliases entirely.

The issue with postfix the table name is that this will exceed the maximum length for an alias if the table name is long. We could truncate them of coarse, feel free to log an enhancement for this.

James