Errors in model after generation

14 posts, 0 answers
  1. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 11 Mar 2011 Link to this post

    Hello,

    Using: OpenAccess Q3 latest build.

    I have a table called "application.authorization.action" in my MySql database.
    My project namespace root is XXX.Data

    When i create a model, the template code inserts:
    Imports XXX.Data.authorization

    Lateron in the Context class it does:

    Partial Public Class Application
        Inherits OpenAccessContext
     
    ....
     
        Public Sub New()
     
    ....
     
        Public ReadOnly Property Actions() As IQueryable(Of Action)
            Get
                Return Me.GetAll(Of Action)()
            End Get
        End Property
    this generates errors, because Action is ambegious... it is also a system class..

    it should be

    Public ReadOnly Property Actions() As IQueryable(Of XXX.Data.authorization.Action)
        Get
            Return Me.GetAll(Of XXX.Data.authorization.Action)()
        End Get
    End Property

    Now, I can change it, but when i do that the next time i loose my changes...




    Public ReadOnly Property Actions() As IQueryable(Of XXX.Data.authorization.Action)
        Get
            Return Me.GetAll(Of XXX.Data.authorization.Action)()
        End Get
    End Property

  2. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 11 Mar 2011 Link to this post

    Also:

    When i select tables in the wizard (Choose database items) it's handy that the table names with dots feel like schema names for the wizard.

    but it would be nice when the table name is "application.data.customers" it creates a namespace "application.data", now it only does "namespace data"

    Finally, when i give a global namespace in the end (last step, advanced options, tab General) lets say "MainSpace", it gives my Context class "namespace MainSpace" , and my other entity class it's own namespace (Data in this example), I would expect at least "namespace MainSpace.Data"...

    Ok, thanks!
  3. DevCraft banner
  4. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 11 Mar 2011 Link to this post

    Well...

    Got some errors in design (create table in model) , but is costing me more than I would like all, so skipping that.

    When i create a table, behind a created entity in the orm model, i can do "Update database". First of all, it gives just a script for all tables, not the changes, but the scrip also has syntax errors! MySql is not accepting "TYPE = InnoDB", I think it should be "ENGINE = InnoDB"...


    -- Data.Test3
    CREATE TABLE `test3` (
        `linked_test2` INTEGER NOT NULL,        -- _linkedTest2
        `id_test3` INTEGER AUTO_INCREMENT NOT NULL, -- _idTest3
        CONSTRAINT `pk_test3` PRIMARY KEY (`id_test3`)
    ) TYPE = InnoDB;


    I'm beginning to think OpenAccess is not the way to go!

  5. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 11 Mar 2011 Link to this post

    Your website, ORM demos!
    The are all for the OLD version of ORM... (Still... I mentioned it 3 months ago!)
    (On left hand side)

    and:
    http://demos.telerik.com/orm
    Reversemapping >> Demo

    results in 

    Server Error in '/orm' Application.

  6. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 13 Mar 2011 Link to this post

    let's keep this thread alive...

    Why is it that when i change the name of a Entity in the model, it does not change the reletive class name of the entity?

    Also when i do a "Update from database" (what is going fine) the manually ajusted class (ajusted the name thus) is not being updated.

    Should i not change the entity name? why not?
  7. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 16 Mar 2011 Link to this post

    Hello Proovit,

    1. I am afraid that we do not check if there are ambiguous class names that are not part of the metadata container on code generation. Actually you could modify the code generation templates in order to provide custom logic for generating the classes. This blog post shows how to achieve that goal;
    2. The code generation uses the namespace of the metadata container as classes’ namespace. It is being set on adding new domain model or via the Model Settings dialog. You could use the suggested approach for custom code generation templates in order to achieve that goal;
    3. This is a known issue that is fixed in the Q1 release of the product;
    4. The wrong behavior appears when a record is deleted from the database that is used by the examples. We will improve the error handling and database resetting in our online demo examples in the future;
    5. It seems that modifying the persistent type’s name does not update the class names in the visual designer. We will investigate the cause for this issue and fix it.

    Regards,
    Damyan Bogoev
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  8. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 17 Mar 2011 Link to this post

    @Proovit

    The documentation is a real problem, classic ORM is mixed in there, there is no clear separation when searching, the wizard samples are out of date and of course they've changed again for Q1 2011 and haven't been updated.

    The documentation is really really light on some of the WPF controls but unlike ORM we're getting somewhere with them at least.

    We're close to giving up on ORM, I'm going back to Q3 2010....the problem is that Q3 2010 has some fundamental issues with CUD stored procedure mapping and I was told to install Q1 2011 as a fix, we bought the entire suite of products and ORM seemed the natural choice but we can't even get the basics working.
  9. Petko_I
    Admin
    Petko_I avatar
    184 posts

    Posted 17 Mar 2011 Link to this post

    Hello Norman,

    We are working on making the browsing of the documentation a smooth experience. We have separate sections for the Classic Wizards, Visual Designer and Fluent API and we are constantly updating it. We are glad to receive any feedback as to the organization of its content. The purpose of the documentation is to be easy to use and guide users that is why we will invest in improving it and will respond to any remarks you have in that direction. The updating is an iterative process and we will constantly include improvements.

    As for the problem with the CUD mappings can you open a support thread and send us the sample project you are using? We have enabled the default mapping for procedures and would like to help you find out why the model used results in the issues you are facing there.

    If you face further difficulties, do not hesitate to write back right away.

    Regards,
    Petko_I
    the Telerik team
  10. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 17 Mar 2011 Link to this post

    @Petko_I

    Okay, I'll raise a ticket, I wasn't going to bother as no one got back to me for 4 days last time I raised a ticket about the CUD mappings, I put it down to you been busy on Q1 2011...

    I just installed SP1 for VS2010 so I'll re-test just in case that makes a difference, if it does I'll post a response here, otherwise I'll raise a ticket and attach a sample project.
  11. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 17 Mar 2011 Link to this post

    Ticker about the VS IDE crash has been submitted
  12. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 17 Mar 2011 Link to this post

    @Petko_l

    Here's an example of how the documentation can easy mis-lead you.

    If you search the ORM help for "stored procedure CRUD mapping" the 1st hit you get is the following link

    http://www.telerik.com/help/openaccess-orm/openaccess-tasks-crud-with-views-and-stored-procedures.html

    Unless you spot on the left that the tree is in 'classic ORM' the document on the right has no mention of this been ORM Classic or if the feature has been deprecated.

    On the search results if you clearly marked what results were for 'ORM classic' it might improve the situation or better still split the two completely. It's so easy not realise your looking at ORM classic. You could also add a filter on the search to exclude classic ORM.

    The Tree on the left has colours that don't really catch your eye, if you stare at the page for a while your naturally drawn to the lighter content on the right hand side.

  13. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 17 Mar 2011 Link to this post

    Yes, I had the same thing a while back. Or you search on something, go into a blog or forum post only to find that it's handling classic ORM. But than you are half way...
  14. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 18 Mar 2011 Link to this post

    Hi Erik and Norman,

     I apologize for the outdated version of the help on our web page. Today or early next week the latest, we will make a new documentation build for the web(it is a separate process than the product release and the .chm help that gets installed with the product)  and we will upload it with all of the new content - new wizards, dialogs, designer features etc. We also had a discussion based on your feedback and made a decision that it is time that the Classic ORM help should be removed from the common help for the product on the web and update it only with new help for the latest product versions. That should result, we hope, with less frustration between the users that browse the help using the help-search. 

    All the best,
    Zoran
    the Telerik team
  15. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 18 Mar 2011 Link to this post

    @Zoran

    Thanks for taking our feedback on board, it will really help.
Back to Top
DevCraft banner