Skip to Content
Jan 25 at 01:19 PM

SAP CAP @assert.unique case insensitive

199 Views Last edit Jan 25 at 01:29 PM 2 rev

Is there any way to set a case insesitive assert.unique on an entity in SAP CAP nodeJS?

I use

@(assert.unique : {MyEntity: [name, version]})
and it is possible to create an entity named "Test" and as well one named "test".Any way to restrict that ?

Or is the only way to achieve that with custom logic in

srv.before('SAVE') and srv.before('CREATE') handlers ?