Hi ,
I am getting EOFError while querying a table . The select contains
String fields, integer fields , a BLOB and a TEXT filed.
The error happens consistently. This is happening in a customer envt.
Anybody has any idea on what could be the issue?
Thanks in advance
stack trace is given below
Yes, the __eq__() and __hash__() functions are overridden to compare
the primary keys (e.g. self.id==other.id, or hash(self.id)). The orm
query works as expected once I remove them from the Entity class
definition.
On Jul 1, 4:03 pm, Michael Bayer mike...@zzzcomputing.com wrote:
does your Entity
I found the problem now - the __hash__() function I had did not return
an integer, it returned a tuple of the composite primary key. I
changed it now and it works, thanks for your help!
On Jul 4, 8:50 am, Adrian adr...@schreyer.me wrote:
Yes, the __eq__() and __hash__() functions are overridden
Hi there,
I have a problem to understand how aliased classes are used in
orm.query.
I have an polymorphic single-inheritance table, which is a lookup
table for about 10 other tables.
On some of that tables there are more than one column which relates to
that table, so they have to be aliased.
loads() implies you're using PickleType even though not indicated here (just a
query by itself tells us very little btw) and the EOFError implies the binary
data being loaded is not a valid pickle string.
On Jul 4, 2011, at 3:09 AM, rajasekhar911 wrote:
Hi ,
I am getting EOFError while
On Jul 4, 2011, at 2:29 AM, Michael Tils wrote:
rating = aliased(BuildingRating)
care_level = aliased(BuildingCareLevel)
to make later:
.query(Building).filter( or_( rating.value.like(%good),
care_level.value.like(well_groomed) ) )
But I couldn't work out how to explicit name
Hello,
thanks for your help.
The joins Building.condition and Building.care_level are pointing the same
table. The table is a single-inheritance construct.
The query:
session.query(Building).join(rating, Building.condition).join(care_level,
Building.care_level)
produces this error:
Here is my mapping, this time in german...
Building class:
class Lookup(OrmBaseObject):
id = 0
lookupCategoryId = 0
category = LookupCategory
value = ''
properties = {
'lookupCategoryId':tables['lookup'].c.lookup_category_id,
'category':
Hello all.
I use Pylons 0.9.7 and sqlalchemy.
I use the Object Relational Mapper with declarative syntax in a few of
my modules.
I was reading chapter 7 of the Pylons book and I understood that sql
injections can be avoided using the expression api.
But can this be also done using ORM?
I tryed
On Jul 4, 2011, at 3:25 PM, Michael Tils wrote:
Here is my mapping, this time in german...
OK, sifting through lots of extraneous details as well as the lack of the
actual table definitions, it seems like you're looking to join from
Building-BuildingCondition-Lookup.
I don't use
Think about it this way:
There's two kinds of strings when you're dealing with SQL: 1) SQL
language, 2) your data input. Don't ever include (2) in (1) –– let the
API do it.
\malthe
On 4 July 2011 21:41, Krishnakant Mane krm...@gmail.com wrote:
Hello all.
I use Pylons 0.9.7 and sqlalchemy.
I
Can you give an example of sql injection working with ORM? Some sample
code etc.
On Jul 5, 5:41 am, Krishnakant Mane krm...@gmail.com wrote:
Hello all.
I use Pylons 0.9.7 and sqlalchemy.
I use the Object Relational Mapper with declarative syntax in a few of
my modules.
I was reading chapter
On 05/07/11 03:03, Malthe Borch wrote:
Think about it this way:
There's two kinds of strings when you're dealing with SQL: 1) SQL
language, 2) your data input. Don't ever include (2) in (1) –– let the
API do it.
How does one do this with the orm?
I am talking about things like session.add
13 matches
Mail list logo