On Jan 17, 10:06 pm, mdipierro <[email protected]> wrote:
> You can use the native Google databse API but you'd miss a lot of the
> benefits of web2py.
>
> You can use the web2py database api on GAE.

I've created a simple application following cookbook (http://
mdp.cti.depaul.edu/examples/static/cookbook.pdf). It works perfectly
on SQLLite but it works only partially on GAE. I say partially as it
doesn't throw any exception and it allows me to create entities (even
the combo box works)... but all the pages that perform some filter
based on the id don't work: for example the page that should display
the receipes filtered by category doesn't display any... It is
possible to verify that the entities have been created succesfully
using the GAE admin console.

Any ideas ?

Something the called my attention is that web2py on GAE uses ID
instead of KEYs....in the GAE admin you can see a column for the KEY
and another for the ID. That creates some overhead on the datastore
(i'm pretty sure that it make necessary to create an extra index
including id).

>
> here is an example of many to many that mimics a ListProperty using
> tagging.
>
> db.define_table('person',db.Field('name'))
> db.define_table('dog',db.Field('name'),db.Field('owners','text'))
> db.dog.owners.requires=IS_IN_DB(db,'person.id','%(name)
> s',multiple=True)
>
> Internally the listproperty is implemented in a similar way anyway.
>


mmm... not sure about that... as the ListProperty is stored as a
single record (you can have a list virtually long as u like and it
will store in a single datastore row and therefore in a single
access...). I've seen that GAE implements  the ListProperty as a
single column... so the list [1,2,3,4] is store as a single field
"1,2,3,4" etc...

Sebastian
> Massimo
>
> On Jan 17, 5:26 pm, sebastian <[email protected]> wrote:
>
> > Hi all,
>
> > Now that I know that web2py supports sessions and memcache also for
> > GAE I'm starting my first web2py app (and it is under GAE.).
>
> > As GAE doesn't use Relational databases (it uses Datastore/Bigtable)
> > it is very important to project the app. with datastore in mind.
> > Therefore it is necessary to use all the resources that Google
> > provides in order to overcome the limitations of GAE Datastore (there
> > are not join for example) If we develop an GAE application with the
> > RDB mentality, it is very probable that we will get an app that goes
> > out of quota all the time.
>
> > The first question that comes up is about DB definition. Using Django
> > I can define a Model using the types as 
> > definedhttp://code.google.com/appengine/docs/python/datastore/typesandproper...
>
> > for example I can define a model property as GeoPtProperty (db.GeoPt)
> > or as a ReferenceProperty (it is used as fereign key) or even better
> > as ListProperty (developers that complain about the leaking of JOIN,
> > then feel better when they discover that it is possible to store a
> > whole object !)
>
> > Is there any way to use the Google provided Types and Property
> > Classes ?
>
> > thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to