problems after upgrading to latest version

problems after upgrading to latest version

Postby hepek » Wed 03 Jul 2013 17:57

I upgraded dotConnect from version 6.7 to 7.7 the latest build 7.7.267.

After I massaged my code a little bit I finally made it work with a new dotConnect.
I am able to compile my app and run it with no problems.

My problems begin when I try to drag & drop any object in my existing diagram.
I get error like: "Partial declarations of 'RRD.OnePlace.DAL.UserLogon' must not specify different base classes"

I checked the code generated by dotConnect and I see my class is declared like this(bad way):
Code: Select all
public partial class UserLogon : Employee

and before I dropped an object in diagram it was declared like this (proper way):
Code: Select all
public partial class UserLogon : INotifyPropertyChanging, INotifyPropertyChanged


So, basically adding new entity, or sp procedure made the class UserLogon inherited from class Employee. This totally makes no sense. I thought that entities generated by devart do not have parent class, and they never had. I have BaseEntity class and all my entities are inherited from it. I DO NOT WANT to change that. I find it very odd that devart would even attempt to inherit entity generated from some other entity.

Please, this is emergency since all my developers already installed the new version of devart. This must be fixed asap. Please don't aks me for small samle app since it might be very hard.

In a meantime is there a way around this issue?
hepek
 
Posts: 115
Joined: Thu 07 Jul 2011 13:59

Re: problems after upgrading to latest version

Postby hepek » Wed 03 Jul 2013 18:06

*note that UserLogon is my old entity and it has nothing to do with the table I dropped on a disgram.

Same think happens for one more old entity named "CustomerSpecialRequirement".
After I drag an object this entity becomes a descendent of "Customer" class. I have no idea why is this happening.

This is very frustrating.
hepek
 
Posts: 115
Joined: Thu 07 Jul 2011 13:59

Re: problems after upgrading to latest version

Postby hepek » Wed 03 Jul 2013 18:11

I also noticed that extra line was added to a diagram designer.css:

Code: Select all
    [Devart.Data.Linq.Mapping.InheritanceColumnMapping(BaseColumnName = @"EMPLOYEE_ID", ThisColumnName = @"USER_ID")]
    public partial class UserLogon : Employee


Where does this InheritanceColumnMapping come? I never had that before.
hepek
 
Posts: 115
Joined: Thu 07 Jul 2011 13:59

Re: problems after upgrading to latest version

Postby hepek » Wed 03 Jul 2013 18:34

at the end I will provide simplified xml for both entities so you can see the relation between the two:

Code: Select all
<Table Name="LINKMAIN.EMPLOYEE" Member="Employees">
    <Type Name="Employee" ed:Guid="1ab6a61d-2738-40ee-b7e9-8d3f57277fae">
      <Column Name="EMPLOYEE_ID" Member="EmployeeId" Type="System.Int64" DbType="NUMBER(10) NOT NULL" IsPrimaryKey="true" CanBeNull="false" Precision="10" ed:ValidateRequired="True" ed:Guid="3fcfbe86-3f4c-475c-af45-e7f679de2bc7" />
      <Association Name="Employee_UserLogon" ed:AssociationGuid="4195cfd2-7fae-446c-bd08-107be38da47b" Member="UserLogon" ed:Guid="e8cbbfc3-d24d-4cb7-b1eb-92fd3c9bd946" ThisKey="EmployeeId" OtherKey="UserId" Type="UserLogon" Cardinality="One" />
    </Type>
  </Table>


Code: Select all
  <Table Name="LINKMAIN.USER_LOGON" Member="UserLogons">
    <Type Name="UserLogon" ed:Guid="dd114fc4-0056-48a3-82da-dca1e795a6f4">
      <Column Name="USER_ID" Member="UserId" Type="System.Int64" DbType="NUMBER(10) NOT NULL" IsPrimaryKey="true" CanBeNull="false" Precision="10" ed:ValidateRequired="True" ed:Guid="6dd9bdae-068a-4d0b-aa94-d95ce2ffdb9d" />
    </Type>
  </Table>
hepek
 
Posts: 115
Joined: Thu 07 Jul 2011 13:59

Re: problems after upgrading to latest version

Postby MariiaI » Fri 05 Jul 2013 09:25

Since dotConnect for Oracle 7.7.217 the new setting "Detect Table Per Type inheritances", which enables automatic detection of TPT inheritances, was added for Create Model Wizard and model.
Please open your model settings, clear this check box, save the changes and then try dragging & dropping any tables on your existing diagram.
Please notify us if this helps.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: problems after upgrading to latest version

Postby hepek » Fri 05 Jul 2013 14:49

yes, that helped. thank you.

don't you think that new "Detect Table Per Type inheritance" feature should be turned OFF by default, so you don't cause developers this unnecessary nightmare?

Put yourself in developer's shoes ..... you download new version, life is good ... and all of the sudden some of your classes change inheritance and fail to compile .... only because you added another object in diagram. very frustrating, you must admit.

Can you point to some documentation about this new "Table Per Type inheritance" feature?

thank you.
hepek
 
Posts: 115
Joined: Thu 07 Jul 2011 13:59

Re: problems after upgrading to latest version

Postby MariiaI » Mon 08 Jul 2013 09:15

We will consider the possibility to make the "Detect Table Per Type inheritances" option disabled by default. We will inform you about the results as soon as any are available.

As for the documentation, we are working on it.
References to this new functionality is available in dotConnect for Oracle history and in the corresponding topic of the Entity Developer documentation:
ORM Support->LinqConnect->Creating Model Using Database-First Approach.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: problems after upgrading to latest version

Postby MariiaI » Tue 16 Jul 2013 06:33

The behaviour is changed: a default value for the "Detect Table Per Type inheritances" option in Model settings is set to False. The changes will be available in the next build of dotConnect for Oracle. We will inform you when it is available for download.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: problems after upgrading to latest version

Postby MariiaI » Fri 19 Jul 2013 06:45

New version of dotConnect for Oracle 7.8 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=27556.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to dotConnect for Oracle