Attributes bug

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Joe Smith
Posts: 32
Joined: Thu 09 May 2013 20:18

Attributes bug

Post by Joe Smith » Tue 19 Aug 2014 16:54

Hi,

I've developed an assembly with some custom DataAnnotations attributes and added it to my ED project (NHibernate).

Some of this attributes have 2 or 3 constructor arguments.
For examples, I have a "RequiredIfAttribute(String, Comparison, Object)"; now, the first time I add it everything works fine; but if I close the project, open it again and try to assign the attribute to a class field, its signature looks like "RequiredIfAttribute(String, Object)". The missing "Comparison" argument is an enum created by me in the same assembly.

If I go to Model->Settings->Attributes and click Refresh in the lower panel, the attribute constructor signature got fixed.

Please help.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: Attributes bug

Post by Shalex » Thu 21 Aug 2014 12:31

We cannot reproduce the problem at the moment in our environment. A test project created basing on your description has been just sent to the email specified in your forum profile. Please specify the exact steps we should follow using it to reproduce the issue.

Joe Smith
Posts: 32
Joined: Thu 09 May 2013 20:18

Re: Attributes bug

Post by Joe Smith » Mon 27 Oct 2014 20:44

Shalex wrote:We cannot reproduce the problem at the moment in our environment. A test project created basing on your description has been just sent to the email specified in your forum profile. Please specify the exact steps we should follow using it to reproduce the issue.
Dear Alex,
I've replied to your email about this issue, please let me know something about it.
Thank you.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: Attributes bug

Post by Shalex » Tue 28 Oct 2014 07:59

We confirm receiving your email. We will process it as soon as possible.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: Attributes bug

Post by Shalex » Thu 06 Nov 2014 13:57

The bug with reading all constructor parameters for attributes when opening model is fixed in Entity Developer 5.7.480.
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).

Joe Smith
Posts: 32
Joined: Thu 09 May 2013 20:18

Re: Attributes bug

Post by Joe Smith » Mon 10 Nov 2014 23:35

Shalex wrote:The bug with reading all constructor parameters for attributes when opening model is fixed in Entity Developer 5.7.480.
I'm sorry but the bug is not fixed.

You can easily verify this on the test project you mailed some times ago: as you can see in the "DataModel1.hbml" file, Class1.Peporty1 has the ClassLibrary1.RequiredIfAttribute with the "comparison" set to "More" but when if you open the project, it's gone.
So, it seems that now ED correctly reads all of the attribute constructor parameters but the enum one still gets lost on project load.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Attributes bug

Post by MariiaI » Tue 11 Nov 2014 13:35

You can easily verify this on the test project you mailed some times ago: as you can see in the "DataModel1.hbml" file, Class1.Peporty1 has the ClassLibrary1.RequiredIfAttribute with the "comparison" set to "More" but when if you open the project, it's gone.
The issue is not reproducible in our environment with this project and latest build of Entity Developer 5.7.480.

Please try reinstalling Entity Developer:
- uninstall Entity Developer and other Devart products, which can use common assemblies (if there are any);
- clear the Program Files (x86)\Devart\dotConnect, Program Files (x86)\Devart\Entity Developer and Program Files (x86)\Common Files\Devart\dotConnect, Program Files (x86)\Common Files\Devart\Entity Developer folders;
- clear the Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\Devart folder (this directory depends on the version of Visual Studio being used);
- remove all Devart.* and policy.*.Devart.* files from the GAC;
- install Entity Developer and other Devart products, if necessary (run installation package as administrator).
Make sure, that during uninstalling/installing all Visual Studio instances are closed.

If this doesn't help, please send us new test project, so that we are able to reproduce this issue in our environment and find the solution for you in a shortest time.

Joe Smith
Posts: 32
Joined: Thu 09 May 2013 20:18

Re: Attributes bug

Post by Joe Smith » Tue 11 Nov 2014 16:15

I've tried to uninstall and reinstall ED following your instructions, I've installed it on a VM too but the bug is always there.
You can see it in the sample project you sent me some months ago; you can download it here:

https://dl.dropboxusercontent.com/u/724 ... c30213.zip

If you open the file DataModel1.hbml in a text editor, you can see that Class1.Property1 has the ClassLibrary1.RequiredIfAttribute and the "comparison" PropertyValue is set to "More" (it's an enum) but if you open the project in ED, it's gone. Same result if you try to set it back again, save and reopen.

I hope this can help you fix the problem.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Attributes bug

Post by MariiaI » Wed 12 Nov 2014 09:15

Joe Smith wrote:If you open the file DataModel1.hbml in a text editor, you can see that Class1.Property1 has the ClassLibrary1.RequiredIfAttribute and the "comparison" PropertyValue is set to "More" (it's an enum) but if you open the project in ED, it's gone.
Could you please specify whether you are encountering this issue when opening the model in a standalone version of Entity Developer or the one integrated in Visual Studio.

Joe Smith
Posts: 32
Joined: Thu 09 May 2013 20:18

Re: Attributes bug

Post by Joe Smith » Wed 12 Nov 2014 13:11

MariiaI wrote:Could you please specify whether you are encountering this issue when opening the model in a standalone version of Entity Developer or the one integrated in Visual Studio.
Standalone version. I don't use the Visual Studio add-in.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Attributes bug

Post by MariiaI » Thu 13 Nov 2014 08:38

Joe Smith wrote:Standalone version. I don't use the Visual Studio add-in.
Thank you for the response. We have fixed this issue. The fix will be included in the next public build of Entity Developer, which we plan to release in about 1-2 weeks. We will inform you when it is available for download.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Attributes bug

Post by MariiaI » Fri 21 Nov 2014 06:13

The bug related to resetting enum arguments of custom attributes in the standalone version is fixed.
New build of Entity Developer 5.7.490 is available for download!
It can be downloaded from http://www.devart.com/entitydeveloper/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=32&t=30797.

Joe Smith
Posts: 32
Joined: Thu 09 May 2013 20:18

Re: Attributes bug

Post by Joe Smith » Thu 27 Nov 2014 20:36

The problem seems to be fixed.
Thank you.

Joe Smith
Posts: 32
Joined: Thu 09 May 2013 20:18

Re: Attributes bug

Post by Joe Smith » Wed 08 Jun 2016 16:55

MariiaI wrote:The bug related to resetting enum arguments of custom attributes in the standalone version is fixed.
New build of Entity Developer 5.7.490 is available for download!
This bug is back again in the latest release (6.0.11). Please fix it ASAP because it's a really annoying one.
Thank you.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: Attributes bug

Post by Shalex » Fri 10 Jun 2016 15:24

We cannot reproduce the issue at the moment.

Please upgrade to the newest (6.0.20) build of Entity Developer. If this doesn't help, try to reproduce the problem with the model \ConsoleApplication94\DataModel1.hbml from the test project topic30213.zip we sent to you on Aug 21, 2014. Notify us about the result.

Post Reply