Micah Skilling wrote:
> 
> If orion encounters a table name that is greater than the length allowed
> by the max-table-name-length parameter in oracle.xml will it truncate
> the length of the name to a legal value and go ahead and create the
> table? Or will it just skip table creation for tables with names that
> are too long?
> 
> >From a couple of tests it looks like with the link tables that orion
> creates (for collections of entity beans with O/R hints in the class)
> aren't created if the name is greater than the legal value. Is this the
> expected behavior or should Orion be truncating the names and then
> creating them?
> 
> Thanks,
> 
> Micah Skilling.


I found the answer on this one (seems to always happen right after
asking the question) and found some interesting behavior. It looks like
Orion is truncating table names for names greater than the specified
length -- as expected. What was happening in my instance is that the
truncated table name happened to match the table name of a different
table. 

For example, I have an applicant ejb with a collection of employment
entity beans. Orion was creating an employment table to store the O/R
information for the applicant ejb.  So, when it came time to create the
table for the actual employment entity bean it never got created since a
table was already present.

The exception I was seeing is below (which of course made me blame
Oracle -- sorry Mr. Ellison)

com.evermind.server.rmi.OrionRemoteException: Transaction was rolled
back: Database error: java.sql.SQLException: ORA-00904: invalid column
name


It'd be nice to have some kind of check that warns when auto-generated
table names match other table names.

Regards,

Micah Skilling.

Reply via email to