-
Notifications
You must be signed in to change notification settings - Fork 2
Feature ETP-2980: Fix tutorial with new features #571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -50,13 +50,13 @@ With our new module created, we will start working with *Projections*. | |||||
|
|
||||||
| ------------------------------------------------------------------ | ||||||
|
|
||||||
| ## Projection | ||||||
| ## Projection and mappings | ||||||
|
|
||||||
| When using Spring Data JPA to implement the persistence layer, the repository typically returns one or more instances of the root class. However, more often than not, we do not need all the properties of the returned objects. | ||||||
|
|
||||||
| In such cases, we might want to retrieve data as objects of customized types. These types reflect partial views of the root class, containing only the necessary properties. This is where projections come in handy. | ||||||
|
|
||||||
| Start by opening *Projections* windows and creating a new projection with the following properties: | ||||||
| Start by opening *Projections and mappings* window and creating a new projection with the following properties: | ||||||
|
|
||||||
| | Field | Value | | ||||||
| | ----------- | ------------------------------------- | | ||||||
|
|
@@ -70,18 +70,20 @@ Start by opening *Projections* windows and creating a new projection with the fo | |||||
| ### Adding the projection to a table | ||||||
|
|
||||||
| As we create the projection, now we need to assign it to a table where we want to extract data. | ||||||
| For this, open the *Tables and Columns* window and look for the *Order* table (as mentioned in the introduction, we want to consume orders). | ||||||
| For this, in the tab *Entity Field*, we need to create a new record selecting the table `C_Order`, which is the table that stores the sales orders in Etendo Classic. | ||||||
|
||||||
|
|
||||||
| ### Adding a Projection | ||||||
| ### Adding a projected entity | ||||||
|
|
||||||
| Next, navigate to the *Projections* tab and add a new projection with the following value: | ||||||
| Next, navigate to the tab *Projected Entities* under the *Projection and mappings* tab and create a new record with the following values: | ||||||
|
|
||||||
| | Field | Value | | ||||||
| | ---------- | ---------------------------------------------- | | ||||||
| | Projection |`rxtutorial - tutorial - 1.0.0 - English (USA)` | | ||||||
| | Table |`C_Order` | | ||||||
| | Mapping Type | `Etendo to external system` | | ||||||
|
||||||
| | Mapping Type | `Etendo to external system` | | |
| | Mapping Type| `Etendo to external system` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subsection title "Adding the projection to a table" is misleading given the updated instructions. In the new workflow, this section actually describes creating a record in the "Entity Field" tab to select the C_Order table, not adding a projection to a table. The subsequent subsection (lines 75-86) is what actually creates the projected entity linking the projection to the table. Consider renaming this subsection to better reflect what the instruction is doing, or restructure the workflow to be more intuitive (e.g., create the projected entity first, then add entity fields).