Help, Reverse Mapping: Object reference not set to an instance of an object.

8 posts, 0 answers
  1. Alex
    Alex avatar
    141 posts
    Member since:
    Mar 2010

    Posted 19 Apr 2010 Link to this post

    I'm trying to evaluate OpenAccess at the moment, although I can't seem to get the reverse mapping to work correctly. (And the error message is not very helpful)
    The error is "Object reference not set to an instance of an object." and it shows up when I try to generate the reverse mapping, or when i just preview it in the advance view.
    It appears on all the tables EXCEPT staff and tennant

    Here is a link to a diagram of the database:
    Database Diagram
    Can anyone help me out?


    *edit*
    I've redone MANY of my primary keys
    Re did all the... relations and everything
    Now it is able to show previews of all tables, except CashSale and Banking, thou I still have no idea why this would change...
    *end edit*
    *final edit*
    Bah... The reverse mapping wasn't picking up the foreign keys correctly.. (Don't know why?)
    As I have multiple primary keys (multi-tenant data + child tables) and multiple foreign keys, OA wasn't picking up all the require columns (and had left some blank in the wizard).
    *end final edit*

    The only things of interest that I can think of is
    -Some of the relations cascade, and there are triggers in place on the Staff_Tenant delete/update to allow for cascade deleteing. (I had to use triggers specifically to prevent a circular cascade error). The only other relation not cascading is staff-cashsale and staffsite-tenant (although when tenant is deleted, it should delete staff and site, thus deleteing staffsite, similarly with update)
    -The trigger in tenant allows for multi row delete, but only single row update other wise I can't identify the individual rows being updated)
    -tenantid is auto incremented (nothing else is auto incremented)



    VS 2010 Pro
    Telerik OpenAccess Q1 2010
  2. Zbigniew Kozłowski
    Zbigniew Kozłowski avatar
    60 posts
    Member since:
    Apr 2010

    Posted 20 Apr 2010 Link to this post

    Hi,
    i had same problem with MySQL and Identifying Relationship when ive changed to Non-Identifying Relationship it works, but id like to know also whats wrong with it.

    Regards,
    Zbigniew Kozłowski
  3. DevCraft banner
  4. Alex
    Alex avatar
    141 posts
    Member since:
    Mar 2010

    Posted 20 Apr 2010 Link to this post

    I found it was happening to mine because it wasn't creating the relations properly. The wizard would only pick like 75% of the variables in the FK/PK's. So I had to manually go in and reselect all the variables in the relations. Although I really think it should give a more descriptive error (as clearly x columns != y columns is easy to check) such as what is wrong, and where.
  5. Ady
    Admin
    Ady avatar
    589 posts

    Posted 21 Apr 2010 Link to this post

    Hi Alexander Sun,
     
     We would like to help you Reverse map the entire schema successfully. Is it possible to provide us with your schema? Maybe there are certain column types that cause the problem.

    All the best,
    Ady
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Alex
    Alex avatar
    141 posts
    Member since:
    Mar 2010

    Posted 21 Apr 2010 Link to this post

    Ok, I've sent a support ticket with an attached db

    Your ticket ID is : 302754


    also i think it is related to my post Link
  7. Ady
    Admin
    Ady avatar
    589 posts

    Posted 22 Apr 2010 Link to this post

    Hi Alexander Sun,
     
     We did receive your schema and could reproduce the incomplete mapping. We are looking into the cause and will get back to you. In the meantime you can manually assign the missing mapping (tenantid) and generate the class.

    We are sorry for the inconvenience caused.

    All the best,
    Ady
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  8. Charlie
    Charlie avatar
    6 posts
    Member since:
    Aug 2010

    Posted 20 Oct 2010 Link to this post

    Running into the same issue - 

    Any solution here?
  9. Ady
    Admin
    Ady avatar
    589 posts

    Posted 26 Oct 2010 Link to this post

    Hi Charlie,

     This was caused due to certain incomplete mapping for reference fields. Can you provide the version of the product that you are using? Maybe updating to the latest available version will help resolving the error.
    Can you send us your reversemapping.config file so that we can ascertain the exact cause. You can attach the file by opening a support ticket.

    Looking forward to your reply.

    Sincerely yours,
    Ady
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner