Private fields and `db_field` arg’
jul-grnx opened this issue · 0 comments
jul-grnx commented
Hello,
I’m playing with private fields with MongoEngine and Graphene-Mongo like this:
class MyDocument(Document):
# define a “private” field (with underscore)
# but set the database field without the underscore:
_private = StringField(db_field="private")
class MyType(MongoengineObjectType):
class Meta:
model = MyDocument
And… the generated MyType
has a field named Private
(not private
).
That make me ask 2 questions:
- It seems the conversion snake_case to camelCase does not make any special case for leading underscore: is it normal?
- Why not consider the database field?