-
Notifications
You must be signed in to change notification settings - Fork 0
View Editor
The View Editor is accessible using the entity Ribbon Bar or the design surface context menu. When you click on “Add View”, you will be presented a resizable dialog box like this one:
The dialog box helps you create a model view (which can be different than a resulting persistence view depending on producers / generators involved in the project):
-
A view is a sub-concept of an entity
-
A view must have a name.
-
A view has properties. These properties are listed in the dialog box. Properties can be directly associated with the parent entity properties (the properties with a left checkbox) or they can be declared ad-hoc using computing expressions.
-
From a view, the CodeModeler inference engine can infer a lightweight entity. This can be configured using the checkbox in the upper right of the dialog box.
By default, the list of properties are the parent entity properties (some properties cannot be used in a view, in this case, they would not even be proposed here). You can check any of the properties you need. In this example above, we created a view that only maps the “Id”, “EmailAddress” and “FullName” properties.
You can also add computed properties to the view when clicking on the “Add” button, as shown in the following image:
Here, using auto-completion hints, we add a view property named “Country” with an “Address.Country” expression:
It means the view will have a computed view property. If a persistence producer is added to the project and if this producer supports generating database persistent views, this computed property will probably become a join with the “Country” column of the “Address” table.
Note: Even if auto-completion prevents mistakes, there is no check in the Visual Studio design environment for computed view property expressions because these expressions cannot be validated at design time. They can only be validated at production time, or at runtime depending on the nature of the output.
- Introduction
- Architect Guide
- Concepts
- Using Visual Studio
- Overview
- Creating a CodeModeler Project
- Visual Environment
- Project Hierarchy
- Design Surface
- Customizing Design Surfaces
- Ribbon Bar
- Property Grid
- Member Format Expressions
- Model Grid
- Method Editor
- View Editor
- Instance Editor and Grid
- Resources Editor
- Inferred Model Viewer
- Building
- Project Physical Layout
- Source Control Support
- Generating
- Aspect Oriented Design (AOD)
- Developer Guide
- The Business Object Model (BOM)
- CodeModeler Query Language (CMQL)
- Starting Guide - Tutorial
- Upgrade From CFE