Vertical inheritance

6 posts, 0 answers
  1. Jan
    Jan avatar
    3 posts
    Member since:
    Jun 2010

    Posted 22 Jul 2010 Link to this post

    Hi,

    I have a db with a table persons, and a few derived tables like 'customers', 'operators' etc. I generated an entity model from the db, an now I try to implement vertical mapping by deleting the default associations between the entities mentioned, and adding a new inheritance link, and disabling the identity column in the classes inheriting 'person'. so far so good.

    I cannot compile however because I keep getting this error:

    Error 3 Duplicated Metadata entries found for type Siloking.RecipyManager.DAL.Person. Please use only one way of mapping. D:\Workspaces\KV\SiloKing\SRM\Siloking.RecipyManager.DAL\obj\Debug\Siloking.RecipyManager.DAL.dll Siloking.RecipyManager.DAL

    The next problem I have is that when I make changes to the entity model and try to propagate them back to the db, I keep getting the message I have to compile the assembly first, which I did a lot of times already (this was before trying to implement inheritance ;-) )

    I have no idea what to do. Maybe someone can help?

    Edit: I am using Q2 2010, VS2010 and W7x64

    Thanks!

  2. Jan
    Jan avatar
    3 posts
    Member since:
    Jun 2010

    Posted 23 Jul 2010 Link to this post

    I found a workaround for the first problem: setting the 'Mapping type' to 'XML' fixes the problem. It seems to be related to the setting 'Attributes'. I would prefer using the attributes setting, so I am interested in a solution!
  3. DevCraft banner
  4. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 23 Jul 2010 Link to this post

    Hello Jan,

     Good to know that you have found a workaround for the problem and managed to get your project in a working state. The exception you are getting is coming from the enhancer and we are investigating it at the moment. Be sure that this exception will no longer be there for our future service pack release.

    All the best,
    Zoran
    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
  5. Jan
    Jan avatar
    3 posts
    Member since:
    Jun 2010

    Posted 26 Jul 2010 Link to this post

    Hi Zoran, thanks for your reply.

    first : Is there already a date for the release of that SP?

    second: Is this problem causing the exception and also the second problem I mentioned (not being able to propagate my changes in the schema back to the db)?
  6. Petko_I
    Admin
    Petko_I avatar
    184 posts

    Posted 29 Jul 2010 Link to this post

    Hello Jan,

    We are going to release an internal build somewhere around the beginning of the next week or may be even at the end of this week. However, this build will not contain the fix for the first problem because we are still working on that. Hopefully we will be able to provide the fix in a service pack a few weeks later. Unfortunately at the moment I cannot give an exact date.
    I do not think the two problems are actually related. Are you able to make any changes to the database with our forward mapping at all, or do you receive the errors in only one solution? I guess you have tried compiling the project in isolation without compiling the whole solution as well as compiling the whole solution. Can you send us a sample project with the problem you experience so that we can further investigate?

    We will keep you updated. Do not hesitate to contact us for anything you find troubling.

    Greetings,
    Petko_I
    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
  7. Petko_I
    Admin
    Petko_I avatar
    184 posts

    Posted 05 Aug 2010 Link to this post

    Hello Jan,

    I wanted to inform you that our internal build has been released and is available under this section. I regret to tell you that the inheritance fix was not introduced, however.

    I need to point some additional hints regarding the error for building the project before updating the database from the domain model. The database instance sometimes is not refreshed properly as it is being cached. You can restart the Visual Studio and see if this solves the problem. As a last resort, you may change the connection information (like the connection id) to something else, rebuild the project and reset the connection back to your original one. This last step will clear the database instance and hopefully will free you of your troubles with the Update Database From Model process.


    Best wishes,
    Petko_I
    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