Ignore the namespace comment.
On Friday, October 11, 2013 5:43:43 PM UTC+8, timh wrote:
>
> As I said
>
> I would use a metaclass to create classes on demand.
> However you would need to use some name mangling scheme so that each users
> class name was garunteed to be unique otherwise
> you could end up in all sorts of mess.
>
> Alternately specify an entity name as a property of the class (or use it
> to define the namespace), and use the same class for all users, along with
> their own custom properties.
>
> this would be a much simpler approach.
>
> Tim
>
>
> On Friday, October 11, 2013 3:50:54 PM UTC+8, Mitul Golakiya wrote:
>>
>> Thanks Tim Hoffman,
>>
>> We are creating one app in which, on admin side User can create his own
>> entities and can create fields in that entity.
>> So as the documentation I have read, to store any entity in datastore
>> which have dynamic fields, we have to use ndb or Expando.
>>
>> But I am getting entity name at runtime, so I am not able to define
>> static classes for my entities.
>> So how can I create dynamic entities with dynamic field support ??
>>
>>
>> On Friday, October 11, 2013 11:24:49 AM UTC+5:30, timh wrote:
>>>
>>> You could use metaclasses to create dynamic models, however you would
>>> always have to create a matching class (which would register the class to
>>> kind map)
>>> before you could perform any query.
>>>
>>> I think you should elaborate more on what you are trying to do, we may
>>> be able to suggest an approach which doesn't require you to go this far.
>>>
>>> Regards
>>>
>>> Tim
>>>
>>>
>>> On Wednesday, October 9, 2013 9:32:03 PM UTC+8, Mitul Golakiya wrote:
>>>>
>>>> Hello All,
>>>>
>>>> We are developing one app on GAE with python.
>>>>
>>>> We are using datastore.py for querying data from datastore, because we
>>>> have to define our entities at runtime. So we can not use db.Model to
>>>> define models. And retrieve data by models.
>>>>
>>>> We have to use "Not Equal" operator to retrieve some data from
>>>> datastore.
>>>> Suppose, I want to retrieve all Persons, with name is not equal to
>>>> "Test".
>>>>
>>>> Here is my code :
>>>>
>>>> filerObj = {}
>>>>> filterObj["name!="] = "Test"
>>>>>
>>>>> dbObj = datastore.Query("Person", filterObj)
>>>>> dbObj.Run()
>>>>> recordsList = dbObj.Get()
>>>>>
>>>>
>>>>
>>>> By this code, we are getting empty result.
>>>> Any idea about what's wrong ??
>>>>
>>>> Thanks in Advance...
>>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.