Figured it out. I had two self-referential foreign keys on the table,
both pointing (obviously) to the primary key, but for some reason I
was specifying foreign_keys to the relations, I just removed these
arguments to the relations and this has resolved itself.
On Aug 19, 12:28 pm, Oliver Beattie
mike...@zzzcomputing.com wrote:
On Aug 18, 2010, at 12:29 PM, Oliver Beattie wrote:
On Aug 18, 3:39 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Sent from my iPhone
On Aug 18, 2010, at 8:27 AM, Oliver Beattie oli...@obeattie.com wrote:
I'm not entirely sure why this is happening
I'm not entirely sure why this is happening… it seems to work for me
in nearly all other circumstances so I'm a bit stumped. Basically, I
have a declarative table which has a character field as its primary
key (it's not an ID which can be returned by the server), yet
SQLAlchemy is issuing an
I'm using Postgres
On Aug 18, 1:27 pm, Oliver Beattie oli...@obeattie.com wrote:
I'm not entirely sure why this is happening… it seems to work for me
in nearly all other circumstances so I'm a bit stumped. Basically, I
have a declarative table which has a character field as its primary
key
On Aug 18, 3:39 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Sent from my iPhone
On Aug 18, 2010, at 8:27 AM, Oliver Beattie oli...@obeattie.com wrote:
I'm not entirely sure why this is happening… it seems to work for me
in nearly all other circumstances so I'm a bit stumped
Hi,
I am just wondering if it is possible to allow a declarative object to
have some of its properties comparable as if they were ClauseElements.
I know I'm not explaining myself terrifically well here, but consider
the following property:
@property
def is_visible(self):
return
Hi there,
The documentation for the undefer() method seems to indicate that it
should be able to accept multiple positional arguments for keys,
however trying this results in an error. I wanted to post this here to
check I'm right in thinking this before I file a ticket. The docs give
the
Aa
Sent from my iPhone
On Jun 14, 2010, at 12:39 AM, sqlalchemy+nore...@googlegroups.com
sqlalchemy+nore...@googlegroups.com wrote:
Today's Topic Summary
Group: http://groups.google.com/group/sqlalchemy/topics
- Multiple databases or multiple schemas? #group_thread_0 [2 Updates]
-
I have some code that is taking values out of one database (a MySQL
latin-1 database) and inserting them into another (postgres, utf-8)
database, and I can't for the life of me work out what is going wrong
here. The traceback looks slightly fishy, so I can only assume
something is going horribly
to
utf-8 logic can be re-established on 0.6 by also adding
use_native_unicode=False.
Docs
athttp://www.sqlalchemy.org/docs/reference/dialects/postgresql.html#uni...(as
of just now)
On May 11, 2010, at 12:04 PM, Oliver Beattie wrote:
I have some code that is taking values out
Hi there,
I have some (declarative, polymorphic) classes that use single-table
inheritance. My configuration is similar to the below:
class BasicObject(Base):
col1 = Column(…)
# discriminator, polymorphic setup etc
class ObjectOne(BasicObject):
col2 = Column(…)
col3 = Column(…)
class
Sorry to bug… I imagine there is no way of doing this, but would be
good to know for sure. If not, this would be really useful
functionality. For instance, I might want to populate one column based
on the contents of one of more other columns.
On 12 Jan, 11:21, Oliver Beattie oli...@obeattie.com
, they cease to be column-level
defaults.
On Mar 5, 2:48 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Oliver Beattie wrote:
Sorry to bug I imagine there is no way of doing this, but would be
good to know for sure. If not, this would be really useful
functionality. For instance, I might
Hi all,
I've run into something I can't for the life of me work out why is
happening. I've done a quick search and can't find anything.
Basically, I have a base class that is subclassed (single table
inheritance) with two relations both pointing to one other table. I'm
probably confusing as hell,
Ah, thanks so much. Guess sometimes you just need a second pair of
eyes to spot where you've messed it up :)
On Feb 23, 7:29 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Feb 23, 2010, at 1:03 PM, Oliver Beattie wrote:
Hi all,
I've run into something I can't for the life of me work
You probably want to take a look at
http://www.sqlalchemy.org/docs/05/mappers.html#adjacency-list-relationships
On Feb 23, 5:42 pm, flya flya flyafl...@gmail.com wrote:
here is code:
Base = declarative_base()
class Page(Base):
__tablename__ = 'pages'
id = Column(Integer,
Hi there,
I feel like I'm perhaps missing something, but I wonder if there's any
way to access the object being updated inside a ColumnDefault? More
specifically, if I have a… let's call it DBObject (using declarative)
which has a callable as its default, is there any way to access that
DBObject
grateful.
Thanks,
Oliver Beattie
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options
Hi all,
I know I'm probably missing something painfully obvious here, but here
goes anyway. I'm trying to create a table which has two foreign keys
to a different table, and failing miserably. I understand I'm supposed
to use the primaryjoin argument to relation… here's what I have in my
class
And we have a winner. Always check you are actually passing the values
to the class constructor that you think you are before posting in a
public group, folks. I've think I've succeeded in humiliating myself
for today…
On Nov 11, 11:52 am, Oliver Beattie oli...@obeattie.com wrote:
Hi all,
I
way to do it, but it does eliminate a lot of
try...except...else's since I do need the explicit subtransaction
stuff.
In any case, thanks for clearing that up for me, and it's good to know
about those accessors.
On Oct 14, 3:18 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Oliver Beattie
I should probably ask something else too… how much overhead is there
in
using subtransactions as opposed to one global transaction?
On Oct 14, 3:18 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Oliver Beattie wrote:
Hi All,
I'm just wondering what happens if I were to call
Hi All,
I'm just wondering what happens if I were to call session.close()
whilst inside a subtransaction? Would it indeed close the session and
abort all of the parent transactions or would it do nothing?
Looking at the code (and I haven't looked at it in any great detail,
sorry) I imagine that
23 matches
Mail list logo