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.

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v3.0.5

Hello,

We need to add the standard audit fields to our dbo.AbpRoles table as well as plug that table into your out of the box auditing functionality. However Volo.Abp.Identity.IdentityRole inherits from AggregateRoot<Guid> and not FullAuditedAggregateRoot<Guid> hence the auditing fields are not generate for us, how do we get round this issue?

We have created an AppRole class, which inherits from FullAuditedAggregateRoot<Guid> and added the following code:

       protected override void OnModelCreating(ModelBuilder builder)
       {
            builder.Entity<AppRole>(b =>
            {
                b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "Roles");
                b.ConfigureByConvention();
                b.Property(p => p.Name);
                b.Property(p => p.NormalizedName);
            });
      }

Unfortunately, the table generating code still uses Volo.Abp.Identity.IdentityRole instead and doesn’t add the auditing fields we want to the dbo.AbpRoles.table

Please can you help?

I think our ideal fix would be for Volo.Abp.Identity.IdentityRole to inherit from FullAuditedAggregateRoot<Guid> much like Volo.Abp.Identity.IdentityUser does.

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

Hello,

I am relatively new to both abp.io and Angular2 so please bear with me. I am currently on your version 3.0.5.

I am looking to implement scroll bars in a modal dialog (i.e. abp-modal), vertical scroll bars to be specific as the dialog immediately gives you a horizontal scroll bar when a data table is added.

I added the following to the component stylesheet:

overflow-scroll {
    max-height: 30px;
    overflow-y: scroll;
}

Please note that I have set the max-height figure above deliberately to a ridiculously low amount.

I have put the style in the following places in the html and still not getting anything displayed:

  1. On the abp-modal tag itself

     &lt;abp-modal [busy]=&quot;isModalBusy&quot; [(visible)]=&quot;isModalOpen&quot; class=&quot;overflow-scroll&quot;&gt;
    
  2. In a new div just after the abp-modal tag above

     &lt;div class=&quot;overflow-scroll&quot;&gt;
    

I have also tried using styles directly in the html file but still no luck.

Please can you tell me what I need to implement to get a vertical scroll bar implemented in a modal?

Thanks.

Showing 1 to 10 of 10 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11