On 7/17/15 5:02 AM, Chengjun JIN wrote:
Hi all,
I am trying to add new rows into an existing many to one database via
sqlalchemy ORM.
What I am doing now(it seems working):
# The many to one relationship is:
stock = relationship('Stock', backref=backref('historicalprices',
order_by=id))
Hi all,
I am trying to add new rows into an existing many to one database via
sqlalchemy ORM.
What I am doing now(it seems working):
# The many to one relationship is:
stock = relationship('Stock', backref=backref('historicalprices',
order_by=id))
# query an object
stock =
Thanks a lot! This works well.
Tom
On Thu, 16 Jul 2015 at 21:23 Mike Bayer mike...@zzzcomputing.com wrote:
On 7/16/15 2:28 PM, Tom Flannaghan wrote:
Thanks for your reply. Our exact problem is that we are creating empty
detached objects from the primary key alone, and then merging them
Hello,
I've got a very peculiar situation, where SQLA fails to create an engine,
because it can't find the installed module, only when I do some relatively
straightforward package discovery import logic using imp.find_module and
imp.load_module.
I'm wondering if SQLAlchemy does some magic
On 7/17/15 1:39 PM, Mike Bayer wrote:
On 7/17/15 1:21 PM, Jeffrey McLarty wrote:
Hello,
I've got a very peculiar situation, where SQLA fails to create an
engine, because it can't find the installed module, only when I do
some relatively straightforward package discovery import logic
On 7/17/15 1:21 PM, Jeffrey McLarty wrote:
Hello,
I've got a very peculiar situation, where SQLA fails to create an
engine, because it can't find the installed module, only when I do
some relatively straightforward package discovery import logic using
imp.find_module and imp.load_module.
On Friday, July 17, 2015 at 2:46:42 PM UTC-4, Michael Bayer wrote:
well then yeah you need to do your own thing :)
i foolishly thought this was something others may have experienced ;)
i'd use inspect(obj) to get the mapper.but also you might want to use
cascade_iterator:
On 7/17/15 2:32 PM, Jonathan Vanasco wrote:
editing the cascade isn't an option.
well then yeah you need to do your own thing :)
i'd use inspect(obj) to get the mapper.but also you might want to
use cascade_iterator:
I'm updating our visual preview tool for edits, and ran into an issue.
In order to best mimic the production view, I can't simply clone the
objects any longer (they have way too many attributes and relationships)
and must apply edits onto the real object.
I'd like to ensure that changes
On 7/17/15 2:18 PM, Jonathan Vanasco wrote:
I'm updating our visual preview tool for edits, and ran into an issue.
In order to best mimic the production view, I can't simply clone the
objects any longer (they have way too many attributes and
relationships) and must apply edits onto the real
editing the cascade isn't an option.
for now this seems to work, though it's ugly.
def recursive_expunge(obj, dbSession):
def _recursive_expunge(_obj):
if hasattr(_obj, '__mapper__'):
for rel in obj.__mapper__.relationships:
Thanks for the pointers; that was all I needed. Plunking around SQLA's
PluginLoader and dialect.__init__.py with pdb...allowed me to figure out
the problem.
__import__ doesn't reload packages if they are already loaded, but the
check to determine already loaded, obviously can't include a
12 matches
Mail list logo