When using max-table-name-length in my database schema Orion does not only
truncate table names, it also alters them. I have a couple of beans which
all have their own relationship to a certain other bean which has a long
name. This should result in Orion creating the following tables:

MyFirstEJB
MyFirstEJB_theCertainOtherBeansIKnow
MySecondEJB
MySecondEJB_theCertainOtherBeansIKnow
CertainOtherBean

Where the tables called "X_theCertainOtherBeansIKnow" store the relationship
keys. However, when these relationship tables have too long names Orion does
not remove characters at the end of the names, rather it removes the bean
name from the table name. So instead of a truncated name like
"MySecondEJB_theCertainOth", I get this name instead:
"theCertainOtherBeansIKnow".
This is quite a problem since many of my EJBs have this relationship, and
then Orion thinks it should create a table named "theCertainOtherBeansIKnow"
for each of them, which it cannot because the table names collide.

As a work-around I have decided to force Orion to use table names which I
will specify in "orion-ejb-jar.xml". - But of course this is not very
satisfactory.

If anyone knows another solution to this problem or have any suggestions I
would very much like to hear from you.


Yours
Randahl


Reply via email to