Activities of "tunji"

Hello lianshiwei,

We were inheriting our role related entities from the FullAuditedAggregateRoot<Guid> class, as soon as I updated the classes to Entity<Guid>, my issue went away.

I was able to make this change because we decided we were going to create the Roles at startup and lock them down so no changes can be made and no auditing would be required.

Thnaks for your help.

Hello again liangshiwei,

Thank you for your screenshot showing that IsDeleted is not generated for IdentityUserRole and IdentityRole. I haven't seen your database tables but I believe neither ABPUSERROLER nor ABPROLES tables would have the ISDELETED column on there (or any of the standard auditing fields for that matter).

For both legal and legislative reasons, the application I am working on needs the Soft Delete facilty that ab.io offers.

https://docs.abp.io/en/abp/latest/Data-Filtering

If you recall I posted this 2 days ago:

I can now add the IsDeleted column to my AbpRoles table (which is somewhat of a hack but that's ok), however because the IdentityUserRoles class does not inherit from the IHasExtraProperties interface, I am unable to add the IsDeleted column to the AbpUserRoles table.

This shows that what I would like is to be able to add the IsDeleted column (as well as the other auditing columns) on both my ABPUSERROLER and ABPROLES tables.

Ideally, I would love the auditing and soft deleting functionality for those tables to be out of the box just like we have for the ABPUSERS table. For now I can manually extend the ABPROLES table to include them. However, and this is where I have hit a roadblock, I am unable to extend the ABPUSERROLES table because it does not inherit from the IHasExtraProperties interface.

That is the issue I need resolving at this point in time, been able to extend the ABPUSEROLES table to include additional fields (in my case, an ISDELETED column of type bool).

Regards

Morning lianshiwei,

For some reason, I can't post the full query in textual form so here it is as an image.:

Note that :

  1. a0.IsDeleted is looking for the IsDeleted column on the AbpUserRoles table, that column doesn't exist.

  2. a1.IsDeleted is looking for the IsDeleted column on the AbpRoles table, that column also doesn't exit.

I can now add the IsDeleted column to my AbpRoles table (which is somewhat of a hack but that's ok), however because the IdentityUserRoles class does not inherit from the IHasExtraProperties interface, I am unable to add the IsDeleted column to the AbpUserRoles table.

How can I extend the AbpUserRoles table OR How can I use DBContext.Roles and DBContect.UserRoles in a query such that ABP wouldn't convert it into an SQL statement that would be checking for the non existent IsDeleted column.

I also tried to use the ObjectExtensionManager Instance function like so:

            ObjectExtensionManager.Instance
               .MapEfCoreProperty&lt;IdentityUserRole, bool&gt;(
                   "IsDeleted"
               )
               

Sadly, this works for IdentityRole and not IdentityUserRole as the latter doesn't inherit from the IHasExtraProperties interface.

Any other sugested workround please?

Hello liangshiwei,

It's not so much the auditing that is my issue but how Abp composes its Entity Framework statements.

AbpRoles and AbpUserRoles tables do not have the IsDeleted field.

When I write something like this in my repostory class to retrieve User and Role records:

        var query = from appUser in DbSet                        
                    join userRole in DbContext.UserRoles on appUser.Id equals userRole.UserID into userRoles
                    from userRole in userRoles.DefaultIfEmpty()
                    join role in DbContext.Roles on userRole.RoleID equals role.Id into roles
		from role in roles.DefaultIfEmpty()
        

The SELECT composed by ABP for ABPROLES and ABP USERROLES tables lists all the audited fields (included IsDeleted) which those tables don't have

SELECT .... FROM AbpUsers AS a LEFT JOIN ( SELECT ..., a0.IsDeleted, .... FROM AbpUserRoles AS a0

I need a way round this please.

Hi Muhammed,

Apolgies as I might have jumped the gun a bit in agreeing your suggstion was a fix even though it does help.

My original question was for a vertical scrollbar for the whole dialog and not just a section of it (i.e. the body)

Hello again Muhammed,

Adding the full stop defnitely gave me the scroll bar I was after.

Thamk you for your support.

Regards.

Hello Muhammed,

Apologies for not getting back to you earlier, I had other things take priority than the abp project.

I did a quick test with your suggested fix this morning and still cannot see a scroll bar unfortunately.

Any other suggestions?

Regards

Showing 1 to 8 of 8 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07