missing: optional code-generation for properties
missing: optional code-generation for properties
It appears there is no way to bypass code-generation for a specific property?
There are cases in which you need to implement both the get-method and set-method for a property - when the persisted property is a calculated value, for example for optimization purposes; or when the persisted value is a representation of another run-time value, for example an object being serialized/unserialized to/from a string.
I'd like to have an option to disable code-generation only - not mappings; since non-generated properties are still technically part of the model, although they must be implemented manually.
Here's where I think it would make sense to gray out certain properties - if non-generated navigation properties will no longer display in gray, perhaps it would make sense to display non-generated properties in gray?
(alternatively, to avoid confusion with existing display in current version, perhaps disabled properties could display in parentheses or with an asterisk? I'd prefer not to use a color-coding such as red, since I use diagrams as documentation - which would mean you need a color-printer and expensive ink...)
Note that bypassing code-generation for navigation properties might also be useful in some cases; although conceptually this option might collide with the existing ability to disable (Generated=false) a navigation property entirely.
It's not the same thing - bypassing code-generation means you have to implement the code yourself; whereas bypassing a property entirely (which makes sense only for navigation properties) means the property is definitively not part of the model (or mappings) at all.
There are cases in which you need to implement both the get-method and set-method for a property - when the persisted property is a calculated value, for example for optimization purposes; or when the persisted value is a representation of another run-time value, for example an object being serialized/unserialized to/from a string.
I'd like to have an option to disable code-generation only - not mappings; since non-generated properties are still technically part of the model, although they must be implemented manually.
Here's where I think it would make sense to gray out certain properties - if non-generated navigation properties will no longer display in gray, perhaps it would make sense to display non-generated properties in gray?
(alternatively, to avoid confusion with existing display in current version, perhaps disabled properties could display in parentheses or with an asterisk? I'd prefer not to use a color-coding such as red, since I use diagrams as documentation - which would mean you need a color-printer and expensive ink...)
Note that bypassing code-generation for navigation properties might also be useful in some cases; although conceptually this option might collide with the existing ability to disable (Generated=false) a navigation property entirely.
It's not the same thing - bypassing code-generation means you have to implement the code yourself; whereas bypassing a property entirely (which makes sense only for navigation properties) means the property is definitively not part of the model (or mappings) at all.
This task is rather specific, and we don't think it's urgent. Besides, it's not clear how to present this feature to most of the users who will not use it.
We allow modifying of our code generation templates for such specific tasks. We also allow defining extended properties for basic objects of the Conceptual model with our templates. These properties can be set in Entity Developer and then used by template for your specific generation tasks.
We should warn you that in case of using your own templates based on Entity Developer standard templates, when updating Entity Developer to a new version, you will need to merge your template with the updated Entity Developer ones if you want to make use of their updated functionality.
We allow modifying of our code generation templates for such specific tasks. We also allow defining extended properties for basic objects of the Conceptual model with our templates. These properties can be set in Entity Developer and then used by template for your specific generation tasks.
We should warn you that in case of using your own templates based on Entity Developer standard templates, when updating Entity Developer to a new version, you will need to merge your template with the updated Entity Developer ones if you want to make use of their updated functionality.
Thanks - I am aware of that; I checked the original template into SVN before making changes, so I should be able to diff and merge with relative ease.Helen wrote:We should warn you that in case of using your own templates based on Entity Developer standard templates, when updating Entity Developer to a new version, you will need to merge your template with the updated Entity Developer ones if you want to make use of their updated functionality.
I don't think the need to implement custom behavior in a get-accessor is as exotic as you make it out to be; to me, it's simply the natural counterpart to the change-events ED generates - in my opinion that's a fairly complex facility for what it does, which is basically just allowing you to aggregate functionality onto set-accessors. Yet you don't think it's necessary to add functionality to get-accessors at all?
Either way, this is something I can very easily implement in my custom template by just adding another flag and a few if-statements.
The new "Generate" extended property, which allows disabling code generation, is added for entity properties and complex type properties.mindplay wrote: I'd like to have an option to disable code-generation only - not mappings; since non-generated properties are still technically part of the model, although they must be implemented manually.
This feature will be available starting from the next build of Entity Developer.
We will notify you when it is available for download.
New build of Entity Developer 4.2.120 is available for download!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (the trial and free versions) or from Registered Users' Area (provided that you have an active subscription).
For the detailed information about the improvements and fixes available in Entity Developer 4.2.120, please refer to
http://www.devart.com/forums/viewtopic.php?t=23252
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (the trial and free versions) or from Registered Users' Area (provided that you have an active subscription).
For the detailed information about the improvements and fixes available in Entity Developer 4.2.120, please refer to
http://www.devart.com/forums/viewtopic.php?t=23252
You did not implement optional code-generation for navigation-properties.
You already have a property named "Generate" on navigation properties - that's why I named this option "Unimplemented" in my own implementation; since you're already using the term "Generate" on navigation-properties, it's ambiguous...
(by the way, setting the "Generate" option on a navigation-property to false via the property-sheet, causes an error-message.)
You already have a property named "Generate" on navigation properties - that's why I named this option "Unimplemented" in my own implementation; since you're already using the term "Generate" on navigation-properties, it's ambiguous...
(by the way, setting the "Generate" option on a navigation-property to false via the property-sheet, causes an error-message.)
We have added the new "Unimplemented" extended property, which allows disabling code generation for navigation properties. In addition, the "Generate" extended property, which allows disabling code generation for entity properties and complex type properties, is renamed to "Unimplemented" now.
We will inform you when the corresponding build of Entity Developer is available.
We will inform you when the corresponding build of Entity Developer is available.
Entity Developer 4.3 is released!
The new build can be downloaded from http://www.devart.com/entitydeveloper/download.html (the trial and free versions) or from Registered Users' Area (provided that you have an active subscription).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23647 .
The new build can be downloaded from http://www.devart.com/entitydeveloper/download.html (the trial and free versions) or from Registered Users' Area (provided that you have an active subscription).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23647 .