Feature or a bug, please vote !

5 posts, 0 answers
  1. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 21 Mar 2011 Link to this post

    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.

     
  2. Jakkie Esschert van den
    Jakkie Esschert van den avatar
    61 posts
    Member since:
    Sep 2009

    Posted 21 Mar 2011 Link to this post

    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.)

  3. DevCraft banner
  4. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 21 Mar 2011 Link to this post

    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.



  5. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 21 Mar 2011 Link to this post

    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
  6. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 21 Mar 2011 Link to this post

    That sounds great.

    Thanks Petar.
Back to Top
DevCraft banner