On Tue, 2007-01-23 at 19:26 +0300, Oleg Broytmann wrote:
> Hello!
>
> On Mon, Dec 11, 2006 at 11:48:29AM -0500, David Turner wrote:
> > print Student.select().max('year')
>
>This is hard to fix, but I managed to fix the following case:
>
> print Student.select().max(Student.q.year)
Thanks!
Hello!
On Mon, Dec 11, 2006 at 11:48:29AM -0500, David Turner wrote:
> print Student.select().max('year')
This is hard to fix, but I managed to fix the following case:
print Student.select().max(Student.q.year)
Please see commit 2233.
Oleg.
--
Oleg Broytmannhttp://phd.p
On Tue, Dec 12, 2006 at 12:01:44PM -0500, David Turner wrote:
> You are probably using some released version of SQLObject and I am using
> svn head? I just tested with 0.7.2 and it worked correctly. So it must
> be something broken fairly recently.
for student in Student.select():
print stude
On Tue, Dec 12, 2006 at 12:01:44PM -0500, David Turner wrote:
> You are probably using some released version of SQLObject and I am using
> svn head? I just tested with 0.7.2 and it worked correctly. So it must
> be something broken fairly recently.
Good news - it worked. Bad news - something
On Tue, 2006-12-12 at 19:46 +0300, Oleg Broytmann wrote:
> 8/QueryOne: SELECT MAX(year) FROM student WHERE 1 = 1
> 8/QueryR : SELECT MAX(year) FROM student WHERE 1 = 1
> 1
>
>What am I doing wrong? ;)
You are probably using some released version of SQLObject and I am using
svn head? I j
On Tue, Dec 12, 2006 at 11:34:52AM -0500, David Turner wrote:
> class Role(InheritableSQLObject):
> department = StringCol()
>
> class Student(Role):
> year = IntCol()
>
> Role.createTable()
> Student.createTable()
>
> first_year = Student(department="CS", year=1)
> print Student.select(
On Tue, 2006-12-12 at 19:11 +0300, Oleg Broytmann wrote:
> > This gives an error, because year isn't a column in the 'role' table.
> >
> > The SQL should be 'SELECT MAX(year) FROM student'.
>
>A bug in the inheritance - it doesn't handle RelatedJoin.
Actually:
class Role(InheritableSQLObjec
On Mon, Dec 11, 2006 at 11:48:29AM -0500, David Turner wrote:
> Code:
> from sqlobject import *
> from sqlobject.inheritance import InheritableSQLObject
>
> __connection__ = "sqlite:/:memory:?debug=t"
>
> class Role(InheritableSQLObject):
> department = StringCol()
> persons = RelatedJoin
[I'm not subscribed; please CC me on replies]
Code:
from sqlobject import *
from sqlobject.inheritance import InheritableSQLObject
__connection__ = "sqlite:/:memory:?debug=t"
class Role(InheritableSQLObject):
department = StringCol()
persons = RelatedJoin("Person")
class Student(Role):