seems this is the month of the many2many relations ;-)
why is a the whole assoc.proxy + _AssocList needed?
Can't one do just with overloading/replaceing the InstrumentedList's
append() ? or something of sorts. i know it might be messier, but
with proper hooks it will be
was filter_by added recently? I have a assign_mapped class User from
TG, and doing a session.query(User).filter_by doesn't work (no such
method).
On 4/4/07, Michael Bayer [EMAIL PROTECTED] wrote:
My preference with assign_mapper at this point is to say:
Client.query.filter_by(sites=siteobj)
here's what i did and it seems to work:
class _Empty: pass
class Base4Association(..):#the base for assoc_objects
...
class MyCollection( list):
factory = None
def append( me, obj =_Empty, **kwargs):
if obj is _Empty:#marker for notset; else just use
Ram Yalamanchili ha scritto:
was filter_by added recently? I have a assign_mapped class User from
TG, and doing a session.query(User).filter_by doesn't work (no such
method).
yes, it's in the latest 0.3.6 version...
this sometime it's hopeful :-)
- orm:
- the full featureset of
vinjvinj ha scritto:
Say I have a python class defined:
def class User(object):
get_calculated_field(self):
return self.a_column_in_user_table_1 +
self.a_column_in_additional_info
user_table = Table('user_table', metadata, autoload=True)
additional_info =
Glauco ha scritto:
Ram Yalamanchili ha scritto:
was filter_by added recently? I have a assign_mapped class User from
TG, and doing a session.query(User).filter_by doesn't work (no such
method).
yes, it's in the latest 0.3.6 version...
this sometime it's hopeful :-)
Thanks Rick,
I updated to the latest SVN rev and things do work now.
Cheers,
François
On Apr 4, 10:08 pm, Rick Morrison [EMAIL PROTECTED] wrote:
Hi fw,
The explicit zero for the
float column was a bug that should be fixed in rev #2491.
MSSQL can store low-resolution datetimes in
The Second Station of the Thirteenth
Word
In the Name of
God, the Merciful, the Compassionate.
[A conversation held
with some young people who, though surrounded by temptation, had not yet
lost their power of reason.]
Being assaulted by
the deceptive, seductive amusements of the present time,
Hi Rick,
I am afraid I reported success a bit too fast.
The problem has changed though.
I am using rev 2492.
If I use the MakerCost mapper as it is defined in my previous email,
I get a strange behaviour:
If I query a MakerCost directly (e.g.
session.query(MakerCost).select_by(..))
trans = session.create_transaction()
messages.delete(messages.c.submitter_type == 'spammer').execute()
bozodetector.insert().execute({'[EMAIL PROTECTED]'})
trans.commit()
On 4/5/07, meyyitfani [EMAIL PROTECTED] wrote:
*The Second Station of the Thirteenth Word*
I hava a table called mytable (defined in the model as mytable_def)
with the following columns:
name, surname, age, address, idcard, sex, mobilenumber
I want to query its name and surname columns only, so I am using a
query such as the following:
Michael, I certainly understand why this hasn't been added. With some
databases like sqlite, a case sensitive search isn't even possible.
This is much more complicated that I would have imagined.
--~--~-~--~~~---~--~~
You received this message because you are
a = user_table()
a.a_column_in_user_table_1 + a.additional_info.your_column
My logic is not as simple as (a.a_column_in_user_table_1 +
a.additional_info.your_column). It's about 20 lines of code. Also I'm
trying to understand how you would add additional attributes to a
python User object
Could someone explain how I could do the following:
#None of these tables have foreign keys defined in the database
entity = Table('entity',meta,autoload=True)
user = Table('user',meta,autoload=True)
class Entity(object):
pass
class User(Entity):
pass
m_entity = mapper(Entity,entity)
Michael Bayer wrote:
My preference with assign_mapper at this point is to say:
Client.query.filter_by(sites=siteobj)
For the mailing list's archives correctness:
Client.query().filter_by(sites=siteobj)
i.e. i dont think constantly adding methods to assignmapper is going
to scale,
Huy wrote:
Hi,
When using the generative limit() offset() or order_by calls
on mapper
query, the sql generated looks weird.
I get something like
select table1.* table2.*
from (select table1a.id from table1a limit 20 offset 0 order by
table1.col) as table_row, table1 join
King Simon-NFHD78 wrote:
Huy wrote:
Hi,
When using the generative limit() offset() or order_by calls
on mapper
query, the sql generated looks weird.
I get something like
select table1.* table2.*
from (select table1a.id from table1a limit 20 offset 0 order by
table1.col) as
explicitly specify the columns:
entity = Table('entity', meta,
Column('somecol', ForeginKey('user.id'))
autoload=True
)
On Apr 5, 2007, at 10:46 AM, mike nelson wrote:
Could someone explain how I could do the following:
#None of these tables have foreign keys defined in the
On Apr 5, 2007, at 6:27 PM, HD Mail wrote:
King Simon-NFHD78 wrote:
Huy wrote:
Hi,
When using the generative limit() offset() or order_by calls
on mapper
query, the sql generated looks weird.
I get something like
select table1.* table2.*
from (select table1a.id from table1a limit
I'm using SA (with Elixir on top) and I have a parent Entity Ranker
that has many children Results; that is, for a Ranker instance rk,
rk.results gives its children and for a Result rs, rs.ranker gives its
parent. When I add new children by providing the parent to the
constructor of the child
20 matches
Mail list logo