Hi Michael,
Some of my coworkers had the same needs of Gaetan... And while I
understand your solution, I figure out if SA could have it natively
(detecting the presence of a dictionary)...
Somethink like:
query.get(dict(columnB='foo', columnA='bar')
Lazy programmers are the best ones... :)
Roger Demetrescu ha scritto:
query.get(dict(columnB='foo', columnA='bar')
Lazy programmers are the best ones... :)
That's the reason lazy programmers share a superclass for all their
domain objects... hint, hint :-)
--~--~-~--~~~---~--~~
You received
Some of my coworkers had the same needs of Gaetan... And while I
understand your solution, I figure out if SA could have it natively
(detecting the presence of a dictionary)...
Somethink like:
query.get(dict(columnB='foo', columnA='bar')
Lazy programmers are the best ones... :)
why
On 6/13/07, Marco Mariani [EMAIL PROTECTED] wrote:
Roger Demetrescu ha scritto:
query.get(dict(columnB='foo', columnA='bar')
Lazy programmers are the best ones... :)
That's the reason lazy programmers share a superclass for all their
domain objects... hint, hint :-)
Yeaph, I
On 6/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Some of my coworkers had the same needs of Gaetan... And while I
understand your solution, I figure out if SA could have it natively
(detecting the presence of a dictionary)...
Somethink like:
query.get(dict(columnB='foo',
On Jun 13, 2007, at 8:48 AM, Roger Demetrescu wrote:
But the use of this function is to ugly to my taste (I know, the
give_me_pk_values_in_correct_order is too big here):
customer = session.query(Customer).get
(Customer.give_me_pk_values_in_correct_order(dict(columnX=3,
columnY=4,
well, if u dont want to write the same thing over and over, write one
wrapping function, and publish it here.
e.g. something like (pseudocode):
def _get_pk_ordered( klas):
table = orm.mapper.registry(klas).mapped_table #or select_table
return whatever-list-of-columns
def
On 6/13/07, Roger Demetrescu [EMAIL PROTECTED] wrote:
Hi Michael,
On 6/13/07, Michael Bayer [EMAIL PROTECTED] wrote:
On Jun 13, 2007, at 8:48 AM, Roger Demetrescu wrote:
But the use of this function is to ugly to my taste (I know, the
give_me_pk_values_in_correct_order is too big