Pring icon indicating copy to clipboard operation
Pring copied to clipboard

How about support encoding or decoding for key ?

Open lu911 opened this issue 6 years ago • 4 comments

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 10.1
  • Pring version: 0.14.0

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

I declared variable as camel-case in model. But I have to save using underscore to firestore. I found encoding or decoding for value but couldn't change for key. I try to change _properties but it's private variable.

How about support decodeKey, encodeKey ?

Relevant Code:

// TODO(you): code here to reproduce the problem

lu911 avatar Dec 17 '18 13:12 lu911

You can override ModelName.

https://github.com/1amageek/Pring/blob/master/Pring/Object.swift#L20

1amageek avatar Dec 17 '18 17:12 1amageek

@1amageek I just said property name.

lu911 avatar Dec 18 '18 00:12 lu911

@YukSeungChan Sorry. not supported

1amageek avatar Dec 19 '18 10:12 1amageek

@1amageek I think it's better to add a feature and I will send PR when I have it done. How is it sound?

lu911 avatar Dec 19 '18 10:12 lu911