Not able to create name attribute in existing entity

Not applicable

Hi Team,

I am trying to add name attribute to existing entities of one of my baas collection. I am doing a PUT request from postman using ql parameter to uniquely identify the entity.

I am getting whole entity in response and name attribute is not getting created.

Kindly suggest if there is any other way to achieve this.

Sample Request ---

https://baas-ug008mr.apigee.net/{orgname}/{appname}/{collectionname}?access_token=XYZ&ql=uniqueid='uniqueid'

Headers--

Content type application/json

Body --

{

"name":"value"

}

Note - This name attribute is not there in entity, I am trying to create it.

Thanks in advance,

Vivek Chikane

1 6 142
6 REPLIES 6

Hi @vchikane1 ,

I was trying to do the same with the BAAS trial version. I do face the same problem. The call is successful but the "name" property doesn't get added to the entity of the collection. I am not sure on the exact reason. Whenever you create your entity for the first time you give a name to your entity though! I guess that's the only way you can add name to your entity.

I tried to directly update through the BAAS UI. The change gets saved but no luck in the change getting reflected 😞

Thanks Hadlee for simulating the same issue.

And yes we can add thru BaaS UI but it won't get reflected when reading.

Regards,

Vivek

Not applicable

Can someone suggest urgently if there is any solution?

Thanks & Regards,

Vivek Chikane

@vchikane1 , @Hadlee N.A ,

  • "Name" property is immutable in all the collections except "users" collection. It's by design.
  • You can update the name attribute only in "users" collection.
  • Use other property like "displayName" if you need to update / introduce at later point of time for collections other than "users"
  • Ideally you will want to plan accordingly for this; use an alternate key name and reference entities by `uuid`, or ensure that `name` is always unique when creating entities.

Yes, It's a good feature to add name attribute if it's missing. @Michael Russo , @Mike Dunker Any reason behind why we restrict add name attribute at later point of time ?

Thanks @Anil Sagar

I understand and I raised a ticket on support portal and they are working on it and will provide the facility to create "name" attribute in existing entities. I hope it will help.

I shall update here when it's done.


Thanks & Regards,

Vivek

@vchikane1 , Great , Thank you for the update. Appreciate taking your time & letting community know about it.