In svn version of the identity documentation there is a note that warns users to not use 'Group' as a class name unless you override the table name by using sqlmeta. I didn't not mention 'Order' however it could easily be added.
Thanks,
Lateef
On 4/20/06, Jorge Vargas <[EMAIL PROTECTED]> wrote:
This is a recurrent question/problem in the mailing list.

People went starting to work on identity will probably name their class Group.
People that are probably testing TG will want to make a shopping cart or something similar and will probably come up with the Order class

We all know the problem is with SQLs "order by" and "group by" keywords but most people don't realise this until it has taken some time to find the answer.

So far I think the best way to go around this is with documentation, but I'm not sure where to put it so people can access it.

I think a couple of sidenotes in the docs could help.

So far I have think of the following places:

- In the "write your own identity" tutorial
- in the TG main documentation, went first declaring SQLObject classes
- Same as above in TG book (I'll make sure this gets there)
- in a FAQ (if there is any)
- Somewhere in trac/docudo
- in this same post so those who search before ask can get this.

I think the text should be something like "Remenber even though SQLObject abstracts us from the DB we still can't use any if it's reserved keywords, the most common mistakes are Order and Group which colide with order by and group by. This Happens because of the way the table names are guess by SQLObject, but you can go around that like this http://www.sqlobject.org/SQLObject.html#changing-the-naming-style"

--- end of post ---
adding this so a search on the errors will show up this post.

pysqlite2.dbapi2.OperationalError: near "group": syntax error
pysqlite2.dbapi2.OperationalError: near "order": syntax error





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to