Thanks! It works with the query using the "long" syntax: *db(db.table_name.id
== key).select().first()*
The short version *db.table_name(key)* does returns *None* as it performs a
check if key is an integer first.
However, using a query instead of a key also works:
*db.table_name(db.table_name.i
yeh..sorry, i worked that out after I sent post. thanks for this
again.
On Oct 16, 4:58 pm, howesc wrote:
> is this the line that is failing:
>
> #this fails, unknown key exception
> entity_keyid = db.funtest[key]
>
> i meant to comment it out in my example since it fails.
is this the line that is failing:
#this fails, unknown key exception
entity_keyid = db.funtest[key]
i meant to comment it out in my example since it fails.
Christian,
Itried this in the gae sdk development console and replaced args with
a string as request not available and its just a quick test.
I copied the dal.py from trunk and replaced into my copy of last
stable release
I get there traceback listed below
#the code in dev console--
from g
pushing to trunk
On Oct 15, 11:01 am, howesc wrote:
> groups wouldn't let me attache a file. here's the text:
>
> diff -r 57544ce34efe gluon/dal.py
> --- a/gluon/dal.py Wed Oct 12 21:53:13 2011 -0500
> +++ b/gluon/dal.py Sat Oct 15 08:54:00 2011 -0700
> @@ -3385,7 +3385,7 @@
>
groups wouldn't let me attache a file. here's the text:
diff -r 57544ce34efe gluon/dal.py
--- a/gluon/dal.py Wed Oct 12 21:53:13 2011 -0500
+++ b/gluon/dal.py Sat Oct 15 08:54:00 2011 -0700
@@ -3385,7 +3385,7 @@
(items, tablename, fields) =
self.select_raw(query,fields,attribu
I finally got back to this. using web2py trunk there was a minor
modification to dal.py in the attached patch to make the following example
work:
db.define_table('funtest',
Field('name', length=128))
def create_one():
id = request.args[0]
from google.appengine.ext import
It would be great if (when the code is fully tested) some full example
code for getting
this working was posted / made available.
It would be a much welcome addition to the greatly improved (and
ongoing :) documentation done on web2py over the last year.
cjm
On Oct 12, 6:03 pm, howesc wrote:
> i
i know we went back and forth a few months back and i helped with the patch
for it, but it was lightly tested and i never used it myself in a production
environment. i suspect it's a simple fix and i'll take a look at the DAL as
well.
cfh
I'm getting nothing (None). If the intention was to having it work this way
(by passing key as id) I'll have a look at the DAL code more closely. Maybe
something affects the key outside of the select_raw function. Have this ever
worked for you?
i am under the belief that while undocumented it should work and most likely
can be fixed.
are you getting an error, or just nothing in the result?
11 matches
Mail list logo