oracle identifier problem

Forum for posting problems using QxOrm library

oracle identifier problem

Postby king » Wed Mar 05, 2014 7:00 am

Oracle limits the length of database identifiers(tables,columns,ets) to 30 characters.I have found QXOrm auto generate SQL columns identifiers by adding table name , column name and some tag,however it is easily over 30 characters.Is there any idea to deal with the problem? Or I have to limit the length of the table name and column name in DB? Wish to hear from u!Thanks.
king
 
Posts: 2
Joined: Wed Mar 05, 2014 6:44 am

Re: oracle identifier problem

Postby qxorm » Wed Mar 05, 2014 8:12 am

Hi,

I didn't know this Oracle limitation : the error message is "ORA-00972: identifier is too long", isn't it ?
I tried to find a solution to bypass it but it seems that there is no way.

You can try to use the method qx::IxDataMember::setSqlAlias() when you register your class in your qx::register_class<T>() function.
The SQL alias provided by this method will be used in SQL queries instead of building a column identifier appending table + column + index.

Or another solution (certainly a better solution) would be to rename your tables and columns with shorter names.
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: oracle identifier problem

Postby king » Thu Mar 06, 2014 12:50 am

Thanks a lot,using setSqlAlias has solved my problem. It seems that ODB has just the same problem,and it give the similar idea. Thanks again. :D
qxorm wrote:Hi,

I didn't know this Oracle limitation : the error message is "ORA-00972: identifier is too long", isn't it ?
I tried to find a solution to bypass it but it seems that there is no way.

You can try to use the method qx::IxDataMember::setSqlAlias() when you register your class in your qx::register_class<T>() function.
The SQL alias provided by this method will be used in SQL queries instead of building a column identifier appending table + column + index.

Or another solution (certainly a better solution) would be to rename your tables and columns with shorter names.
king
 
Posts: 2
Joined: Wed Mar 05, 2014 6:44 am

Re: oracle identifier problem

Postby qxorm » Thu Mar 06, 2014 8:12 am

Thanks a lot,using setSqlAlias has solved my problem.

Great !
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 7 guests

cron