Activities of "EngincanV"

I've tested IsRequired(false) and it solves the query issue, but the Author itself isn't deleted. An author can't exist on its own in this case and now we have a "ghost" Author record, since BookId is now allowed to be NULL. So I don't think we should use IsRequired(false). IsRequired configures whether this is a required relationship (i.e. whether the foreign key property(s) can be assigned null). It doesn't ensure that a Book requires an Author. It only ensures that the FK is required/can't be NULL => an Author must have a BookId.

In your design, it's normal not to delete the author itself because while you are setting the author as null it just ensures it does not have any reference for the related author. So, the cascade delete option of EF Core does not work in that case.

I've created a new and better (relation wise) example using the ASP.NET Core Web API template, where the removal works as expected: https://cdn.fuzed.app/share/abp/EFCorePlayground.zip

Yes, this is what it should look like. Now you are defining the UserId as required and made it as not nullable, in the previous example, it was nullable and in that case, a SQL statement loop occurred.

Hi, can you please share what you have done to override the localization entries? For example, you might be followed this documentation, but the options might be configured between the debug pragma statements (e.g. #if DEBUG)

Or did you change the localization entries on the angular UI side? (https://abp.io/docs/latest/framework/ui/angular/localization) If you did, then the environment might not be set correctly.

In your db configuration it seems you set the one-to-one relationship as required, however, this is not what you want (because you made the Author as nullable (Author?)), so you should make the following change (set IsRequired(false)):

        builder.Entity<Book>(b =>
        {
            b.ToTable(AbpHardDeleteConsts.DbTablePrefix + "Books", AbpHardDeleteConsts.DbSchema);
            b.ConfigureByConvention(); //auto configure for the base class props
            b.HasOne(x => x.Author).WithOne(x => x.Book)
                .HasForeignKey<Author>(x => x.BookId)
-               .IsRequired()
+               .IsRequired(false)
                .OnDelete(DeleteBehavior.Cascade);
        });

If you don't change the configuration like that, you can't set the Author as null, and SQL query will be generated over and over again.

Hi, normally it should not be like that. It seems there is a mis-configuration in the database side. I will check your project and write you back asap.

Hi, thank you very much. I imagine this applies to all entities, but I would like to do it for just one entity.

Hi, when you do this the related placeholder will be applied to all of your index.js files. However, since you will only write your custom code for a single index.js file, the other placeholders will be empty and they will be shown as comment blocks. So, you will be able to write your custom code per file by your choice.

Hi, yes you can use the custom code support to add an entity-action to the data table directly. You can apply the following steps:

1-) Edit Frontend.Mvc.Page.index.js.txt template and add custom-code block placeholder:

                           //<suite-custom-code-block-10>
                              //your custom code goes here...
                          //</suite-custom-code-block-10>

2-) Regenerate the same entity, after you do that the placeholder will be added for the related entity, and you can update the content in the placeholder for the related index.js file:

                           //<suite-custom-code-block-10>
                           ,{
                                text: l("ClickHere"),
                                action: function (data) {
                                    //define what should happen when to the action clicked
                                }
                            },
                          //</suite-custom-code-block-10>

3-) Then in the next code generations, ABP Suite will respect your change, and will not override the specified section.


For further info please refer to the documentation: https://abp.io/docs/latest/suite/customizing-the-generated-code#adding-new-custom-hook-points-changing-their-places-1

<suite-custom-code-block-10> is just an example placeholder, you can use any number, however, please note that the number should be used only once per page.

Hi, indeed there is a problem as you stated. But this is by design for now. I will create an internal issue for that because I agree that we should also reflect the impersonation on the auth server side.

Thanks for reporting. Regards.

Hi @EngincanV ,
why did you close the thread about abp 8.3?

https://abp.io/support/questions/7844/Bugs--Issues-v83x

Thanks

Hi, it was by mistake. Thanks for reminding me. I've reopened it.

yes! worked

Glad to hear that. Probably it was a temporary problem due to your projevlct and suute integration. Closing the question since your problem is resolved.

Feel free to reopen it if it occurs again. Best regards.

Hi, this is indeed a very strange bug. Can you remove your solution from ABP Suite, then clean&build your solution and try to add the solution again and regenerate CRUD pages?

Showing 591 to 600 of 1371 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 07, 2025, 08:20