This is a migrated thread and some comments may be shown as answers.

Feature or a bug, please vote !

4 Answers 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
N Mackay
Top achievements
Rank 1
N Mackay asked on 21 Mar 2011, 03:00 PM
If you import a table called "ContactHistory" and generate a CUD mapping for insert the table name will be 'sp_oa_ins__contact _history'

If you import a table called "CONTACTHISTORY" and do the same as above the generated name (which is read only) is 'sp_oa_ins__c_o_n_t_a_c_t_h_i_s_t_o_r_y'. I've never ever seen a stored procedure named like that. Also why can't the developer not choose the naming convention (same applies to the TSQL which is not maintainable) , our dbo (and others will)  correctly states it's non-compliant.

Rather than check the next char is lower it just ignores and generates that unreadable name instead.

The ORM team have confirmed the SP name is generated from the table name not the entity name, fair enough but our database has 600+ tables, most are uppercase and they can't be changed. They don't think it's a bug although agree it needs to be improved.
 
I'm arguing it's a bug, am I been unfair ?

Any comments would be welcome.

 

4 Answers, 1 is accepted

Sort by
0
Jakkie Esschert van den
Top achievements
Rank 1
answered on 21 Mar 2011, 06:23 PM

That naming looks like it's the result of UTF-8/UTF-16 conversion or something like that.

Also, the stored procedures are name 'sp_' which seems sensible, but due to some Microsoft madness reduces performance on SQL server because all stored procedures starting with sp_ are first looked up in the master database, as documented here. So i'd suggest a different prefix. (I won't blame anyone, it did that for years before finding out it made a difference.)

0
N Mackay
Top achievements
Rank 1
answered on 21 Mar 2011, 06:28 PM
Jakkie,

We suspected it was due to SQL server collation but not sure.

Cheers for the "sp_" tip, that's something I've done in the past.

The ability to specify the prefix is essential, shouldn't be hard to give us some settings in the model properties or somewhere.



0
PetarP
Telerik team
answered on 21 Mar 2011, 06:51 PM
Hello Norman,

We will provide another tab in the Model Settings Dialog from where fine tuning on the names will be possible. We are targeting this implementation for our next Service Pack. Basically with introducing this tab will be able to cover the entire old configuration plus some additional goodies.

All the best,
Petar
the Telerik team
0
N Mackay
Top achievements
Rank 1
answered on 21 Mar 2011, 07:57 PM
That sounds great.

Thanks Petar.
Tags
General Discussions
Asked by
N Mackay
Top achievements
Rank 1
Answers by
Jakkie Esschert van den
Top achievements
Rank 1
N Mackay
Top achievements
Rank 1
PetarP
Telerik team
Share this question
or