The option to make several navigation properties to the same entity.
Classic example: You have a table/entity for dropdown items and want to reference it several times, but with different property names (color, category, gender, ...).
When generating the Blazor DataGrid, the fact that the enums can also be defined as nullable is not taken into account. As with the DateTime, two templates would be required:
It would be ideal for your tests if you could create an entity model with all possible combinations and data types with which you could test the templates. Because with the current templates (8.0.2) I have already had to fix six of them because otherwise the solution would not compile.
I just had problems with the suite when I tried a master-child relationship and then wanted to undo it. The procedure can be described as follows:
Create a master-entity named Company (-> Company.json
) -> generate the classes
Create a child-entity named Employee, select Company as master (-> Employee.json
)
Note: The information of the child is also written in Company.json
(which causes the problem later).
So I change the type of the Employee back from Child -> Master.
Create a regular navigation property for Company and generate the classes for Employee.
Then I generate the classes for the Company again. Now I have problems because of missing methods etc.
I then realized that there were still old entries of the child in Company.json
. They were not deleted again when I switched back from Child -> Master for the Employee.
Since you can't see this in the Suite UI, errors quickly occur and I then spent a lot of time trying to find the error in the templates...
Thank you very much, I have now understood the concept.
I assume that you can get pretty far with the minimum resources of 250 MB when hosting on Azure, right?
I wish that you could also select the base class for the child entities (not root classes, of course, but the other three). Specifically, I would have liked to set the child to "FullAuditedEntity".
Thank you, that answers certain questions.
But WHY can I run the Blazor server app without Redis and not the public website? Is it because the Blazor app is required for authentication and the CRM module, making it a distributed application?
Thanks for the link, but it doesn't actually answer my question.
I did NOT select "tiered" when generating the solution.
We have already made several ABP applications with Blazor Server (without Redis Cache). But never with the "Public Website" so far. Now we would like to integrate it and were surprised that the Redis cache is necessary here. We do not have a distributed / tiered application.
I know that this is a prerequisite for the CRM module.
I would be interested to know why the cache is absolutely necessary? What are the reasons for this? Does it have to do with the fact that the Blazor app and the public website share certain things?
I also have the question of how large the cache needs to be if I host the application on Azure... that costs extra money again...
Thanks, Adrian
Thank you, but the main problem is the error in the DataGrid and not the migration ;-) But I assume you created a bug for that too.
1. Create a master entity in the Abp Suite
2. Generate the master (without "Add migration" - I only want to do this once I have generated all the entities correctly)
3. Create a child entity with the above master as parent
4. Generate the child -> ends with error due to DB migration
5. Compile the solution -> ends with error in DataGrid, see below
If the child entity contains properties that require a DisplayTemplate in the DataGrid (e.g. bool or DateTime), this leads to the following error when compiling:
RZ9999 The child content element 'DisplayTemplate' of component 'DataGridColumn' uses the same parameter name ('context') as enclosing child content element 'DetailRowTemplate' of component 'DataGrid'. Specify the parameter name like:
'<DisplayTemplate Context="another_name">
to resolve the ambiguity
I can solve this by writing something like <DisplayTemplate Context="option_context">
(you already do this with the actions, for example), but it is then overwritten every time I have to regenerate the entity.
With the child, there is no option to deactivate the DB migration. If you don't want this for the master, then you don't want it for the child either. In addition, because of the above error, it naturally means that a migration can never be created because of the error in the DataGrid.
Thanks for fixing and refunding it.
Adrian