mapper() has a selectable= argument, go read about it.
it can do just about anything u fancy.
Is there a way to create object mappers with bean managed
persistence, as the Java folks would call it? What I would like to
do is to map a class to a Selectable such as a join. Now when an
object
Sorry but I don't see how the select_table parameter (used in
inheritance hierarchies) relates to my question. Selecting things from
a Selectable is not much of a problem, for example, and I need more
than one table.
On 18 Jun., 13:00, svilen [EMAIL PROTECTED] wrote:
mapper() has a selectable=
The MapperExtension might be what I need, however.
On 18 Jun., 13:48, [EMAIL PROTECTED] wrote:
Sorry but I don't see how the select_table parameter (used in
inheritance hierarchies) relates to my question. Selecting things from
a Selectable is not much of a problem, for example, and I need
I know that you can:
my_query.select_by(my_source.c.code.in_('1', '2'))
Is there a way to use kwargs with in_ as you can with equality
settings, as in:
my_query.select_by(code='1')
Since SA is NOT a framework, I imagine I could wrap the filter_by
method to work out Django style kwargs like
Since upgrading to 0.3.8 (from 0.3.6), I've run in to a problem with long
identifiers. It seems that _truncate_bindparam is being applied to both
parts of the ClauseElements (that is, the parts both before and after the
AS), and is testing = (instead of ) max_identifier_length, so that when I
Ok, I applied that change to the version I'm using (0.3.8). That
fixed it.
But I think I stumbled on another bug/inconcistancy.
If I tried to str/repr obj.attr it failed.
I looked around the code and this fix seemed to work, but I'm not sure
if it fits in with how the class is intended to
Ron wrote:
Ok, I applied that change to the version I'm using (0.3.8). That
fixed it.
But I think I stumbled on another bug/inconcistancy.
If I tried to str/repr obj.attr it failed.
[...]
Does that make sense? Or is the problem deeper in the code? It
seems to go along with what you
On Jun 18, 2007, at 4:13 AM, [EMAIL PROTECTED] wrote:
Is there a way to create object mappers with bean managed
persistence, as the Java folks would call it? What I would like to do
is to map a class to a Selectable such as a join. Now when an object
is created, its attributes should be
On Jun 18, 2007, at 7:00 AM, svilen wrote:
mapper() has a selectable= argument, go read about it.
it can do just about anything u fancy.
select_table is only used for polymorphic inheritance situations such
that a mapper's select operations occur via a different selectable
than that
On Jun 18, 2007, at 11:47 AM, David S. wrote:
I know that you can:
my_query.select_by(my_source.c.code.in_('1', '2'))
Is there a way to use kwargs with in_ as you can with equality
settings, as in:
my_query.select_by(code='1')
Since SA is NOT a framework, I imagine I could wrap the
On Jun 18, 2007, at 11:57 AM, Cory Johns wrote:
Since upgrading to 0.3.8 (from 0.3.6), I've run in to a problem
with long
identifiers. It seems that _truncate_bindparam is being applied to
both
parts of the ClauseElements (that is, the parts both before and
after the
AS), and is
On Jun 18, 2007, at 2:30 PM, gardsted wrote:
If I were to suggest something
it would be a two-toc approach - a toc for
python-programmers and one for sql-programmers.
SQLAlchemy would like you to assume both roles. I see a lot of
people blogging about ORMs are good because you dont
Dear list...
I'm having trouble with two assign-mappers with a custom JOIN condition.
(And I admit that I'm not yet good at that in SQLAlchemy. So be gentle.)
powerdns_records_table = Table(
'records', meta,
Column('id', Integer, primary_key=True),
Column('name', Unicode(80)),
On Jun 18, 2007, at 4:25 AM, [EMAIL PROTECTED] wrote:
In my first experiments with elixir I noticed that sqlalchemy doesn't
handle foreign keys correctly on autoloaded tables. This has to to
with schema handling in the postgresql driver. A foreign key
referencing a table in the public
On Jun 18, 2007, at 3:34 PM, Christoph Haas wrote:
Yes, this may look a bit dirty. The JOIN condition is really that
and I
have no chance to alter the table schemas because that's what another
application demands. The powerdns_records_table uses a string and
dhcp_hosts_table uses a
django's method of shoving SQL operators into the names of keyword
arguments seems horribly ugly to me. SQLAlchemy's approach is to
use query.filter(sometable.c.col.in_(x, y)). it uses the same
operators as everything else without the need to memorize magic codes
to embed in keyword
Dear List.
How do I do this more ormish?
The statement is supposed to find the latest messages which havent yet
been answered
by 123456, assuming a later message is an answer;-)
def play4():
print ### play4 #
engine=create_engine(dburi)
On Jun 18, 2007, at 3:34 PM, Christoph Haas wrote:
assign_mapper(session_context, DhcpHost, dhcp_hosts_table)
assign_mapper(session_context, DnsRecord, powerdns_records_table,
properties={
'dhcphost': relation(DhcpHost,
primaryjoin=(cast
On Jun 18, 2007, at 4:52 PM, gardsted wrote:
Dear List.
How do I do this more ormish?
The statement is supposed to find the latest messages which havent yet
been answered
by 123456, assuming a later message is an answer;-)
def play4():
print ### play4 #
Fantastic: and now i don't need the join to the persons table anymore
- it stays hidden inside the message object, so i can just ask for
sender.name or whatever i want - that's nice - If I have the
objects, i can delegate the use of them to others, maybe leading to
higher level of reuse (= less
20 matches
Mail list logo