Hi all,
It doesn't do the second filter with those queries:
session.query(User).options(joinedload(channels)).filter(User.id ==
int(userId)).filter(Channel.title !=
zeptextstuff.txt).order_by(Channel.titleView).first()
or
session.query(User).join(User.channels).filter(User.id ==
, 3:51 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Dec 6, 2010, at 2:39 PM, Alvaro Reinoso wrote:
Hi all,
I have those two classes:
class Playlist(rdb.Model):
Represents playlist. It may contain playlist items
rdb.metadata(metadata)
rdb.tablename(playlists
...@zzzcomputing.com wrote:
On Dec 7, 2010, at 10:09 AM, Alvaro Reinoso wrote:
The relation is OK, one-to-many between Playlist and PlaylisItem.
However, PlaylistItem can contain one Playlist or one Layout and that
Playlist could be in many PlaylistItems. I know it's weird relation if
I already
Hi all,
I have those two classes:
class Playlist(rdb.Model):
Represents playlist. It may contain playlist items
rdb.metadata(metadata)
rdb.tablename(playlists)
id = Column(id, Integer, primary_key=True)
title = Column(title, String(50))
pending =
to that user. I think it's because
of that relation.
How could I avoid this?
Thanks!
On Dec 1, 6:35 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Dec 1, 2010, at 5:46 PM, Alvaro Reinoso wrote:
Hello,
I have a system to manage users in my application, but I'm getting
some troubles
I just fixed the error. I didn't see it before. I initialize the
userGroup attribute to new UseGroup instance in one of the migration
functions.
Thanks!
On Dec 2, 11:22 am, Michael Bayer mike...@zzzcomputing.com wrote:
On Dec 2, 2010, at 11:13 AM, Alvaro Reinoso wrote:
I think I see
Hello,
I have a system to manage users in my application, but I'm getting
some troubles with it.
Every user has to belong to a group of users. One user can only be in
one group.
I have those tables (inheriting from rdb.Model is basically the same
thing than using sqlalchemy's declarative model)
Hello,
I have this table:
class Region(rdb.Model):
Represents one region in the layout
rdb.metadata(metadata)
rdb.tablename(regions)
id = Column(id, Integer, primary_key=True)
title = Column(title, String(50))
..
channelId =
So what do you suggest to get the instance by title?
I can query the database by title to get the id and then query again
to get the instance by id. What do you think?
On Nov 17, 1:10 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Nov 16, 2010, at 3:56 PM, Alvaro Reinoso wrote:
Hi
Fixed it!
On Nov 22, 10:14 am, Alvaro Reinoso alvrein...@gmail.com wrote:
So what do you suggest to get the instance by title?
I can query the database by title to get the id and then query again
to get the instance by id. What do you think?
On Nov 17, 1:10 pm, Michael Bayer mike
Hello all,
I have these classes:
class Screen(rdb.Model):
Represents the screen
rdb.metadata(metadata)
rdb.tablename(screens)
id = Column(id, Integer, primary_key=True)
title = Column(title, String(100))
..
crm = relationship(CRM,
...@zzzcomputing.com wrote:
looks fine to me, would need full stack trace + single script file of
runnable, reproducing code, thanks.
On Nov 18, 2010, at 6:37 PM, Alvaro Reinoso wrote:
Hello,
When trying to add a new item doing:
session = session.add(mediaGroup)
I got this error
access to self.__dict__['foo']. If self is a mapped object, then
thats your issue.
Also note this is still an out of context cut-and-paste, if you really want
me to figure it out it has to be an isolated test script.
On Nov 19, 2010, at 2:49 PM, Alvaro Reinoso wrote:
Ok, This is the code
Hello,
When trying to add a new item doing:
session = session.add(mediaGroup)
I got this error:
Module sqlalchemy.orm.attributes:834 in get_collection
return getattr(user_data, '_sa_adapter')
class GenericBackrefExtension(interfaces.AttributeExtension):
return getattr(user_data,
Hi all,
I have a problem when querying the database:
This channel class:
class Channel(rdb.Model):
Represents both complex channels and trivial ones (media)
rdb.metadata(metadata)
rdb.tablename(channels)
id = Column(id, Integer, primary_key=True)
title =
DB requests I suspect you already would have
realized that the data could easily be encoded in the original page
render.
On Oct 28, 4:22 pm, Alvaro Reinoso alvrein...@gmail.com wrote:
Hey guys,
I have a doubt. I need to get the data from the sever twice every time
when I load a page, one
Hello,
I got a weird error when I try to create a new object. Before It
worked without any problem, but I got this error after adding a new
attribute to the User class. This attribute is related to Screen in a
relation many to many through user_screens. This is the error:
InvalidRequestError:
Hey guys,
I have a doubt. I need to get the data from the sever twice every time
when I load a page, one to render the HTML and another one to get the
data for client side (javascript).
So I don't know exactly what it's the best way and fastest. I was
trying to implement a session object and
Hey guys,
I have a problem when I import classes from one to another. I have
those classes in different modules:
crm.py
from CRMContactInformation import CRMContactInformation
class CRM(rdb.Model):
Set up crm table in the database
rdb.metadata(metadata)
I solved the problem delaying the imports like:
from zeppelinlib.screen.ScreenTest import Screen
CRMContactInformation.id = Column(id, Integer,
ForeignKey(Screen.id), primary_key=True)
On Oct 25, 11:18 am, Alvaro Reinoso alvrein...@gmail.com wrote:
Hey guys,
I have a problem when I import
Hello,
I get errors when I try to create tables one to one relation. Screen
contains crm and crm contains more classes. The relation is one to one
between crm, so I want to use the screen id as primary key in crm. And
the relation is one to one between crm and some classes, I just added
one class
must be imported before you attempt
to initialize the mappings. If class A references B, but class B doesn't
exist, you get errors like that, so importing the modules that contain both
class A and B solves the issue.
On Oct 25, 2010, at 2:55 PM, Alvaro Reinoso wrote:
Hello,
I get
It's fixed. I was my mistake, I didn't realize it. Thank you!
On Oct 25, 5:19 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Oct 25, 2010, at 4:59 PM, Alvaro Reinoso wrote:
I think it should be another problem because I have a file where I
initialize all the tables, so that file
Hello,
I'd like to know what the best choice is. This is what I do in my
system:
I'm using grok server and python on the server side; and javascript on
the client side. I store all the user data in a session object and
this data gets called twice, one to render the HTML on the server side
and
, Michael Bayer mike...@zzzcomputing.com wrote:
On Sep 13, 2010, at 2:31 PM, Alvaro Reinoso wrote:
Yes, I've done that. I doesn't work either.
for chan in channels:
if chan.id == channel.id:
chan = session.merge
:
chan.items.append(item)
break
Do you have any idea how I can solve this problem? or another
approach?
Thanks!
On Sep 10, 5:09 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Sep 10, 2010, at 2:57 PM, Alvaro Reinoso wrote:
Hello guys,
I have
Bayer mike...@zzzcomputing.com wrote:
On Sep 13, 2010, at 2:13 PM, Alvaro Reinoso wrote:
If I merge the updated channel like you can see in this piece of code
it's working:
def insertXML(channels, strXml):
Insert a new channel given XML string
channel = Channel
I have some problems when I try to update information in some tables.
For example, I have this table:
class Channel(rdb.Model):
rdb.metadata(metadata)
rdb.tablename(channels)
id = Column(id, Integer, primary_key=True)
title = Column(title, String(100))
Hello guys,
I have this table:
class Channel(rdb.Model):
rdb.metadata(metadata)
rdb.tablename(channels)
id = Column(id, Integer, primary_key=True)
title = Column(title, String(100))
hash = Column(hash, String(50))
runtime = Column(runtime,
Hello,
I'd like to query the database and get read-only objects with session
object. I need to save the objects in my server and use them through
the user session. If I use a object outside of the function that calls
the database, I get this error:
DetachedInstanceError: Parent instance is not
,
backref=media_groups)
Thanks!
On Aug 13, 2:15 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Aug 12, 2010, at 1:08 PM, Alvaro Reinoso wrote:
Hello,
I'm trying to link one table to itself. I have media groups which can
contain more media group. I created a relation many to many
, 8:36 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Aug 12, 2010, at 5:43 PM, Alvaro Reinoso wrote:
I'm trying that, but I got different error:
Could not determine relationship direction for primaryjoin condition
'users.id = :id_1', on relationship User.mediaGroups. Specify
Hello,
I'm trying to link one table to itself. I have media groups which can
contain more media group. I created a relation many to many:
media_group_groups = Table(
media_group_groups,
metadata,
Column(groupA_id,
:
ArgumentError: Could not determine relationship direction for
primaryjoin condition 'users.id = :id_1', on relationship
User.mediaGroups. Specify the 'foreign_keys' argument to indicate
which columns on the relationship are foreign.
Thank you!
On Aug 12, 1:08 pm, Alvaro Reinoso alvrein...@gmail.com wrote
)
Do I need to add something else to that table?
Thanks!!!
On Aug 12, 5:15 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Aug 12, 2010, at 5:09 PM, Michael Bayer wrote:
On Aug 12, 2010, at 4:58 PM, Alvaro Reinoso wrote:
I'm still working on the solution. I've found out some
Hello,
I have these classes:
class Channel(rdb.Model):
rdb.metadata(metadata)
rdb.tablename(channels)
id = Column(id, Integer, primary_key=True)
title = Column(title, String(100))
items = relationship(MediaItem, secondary=channel_items,
Hello,
I got this error when I've tried to relate some classes:
UnmappedClassError: Class 'zeppelinlib.user.UserTest.User' is not
mapped
I don't get errors when I have relation many-to-many.
This is my file where I store all the User classes.
user_channels = Table(
Solved it. I'm using grok as CMS and didn't realize I have to grok
every component every time when I use it. That's why I got that error.
Thanks anyway!
On Aug 4, 4:27 pm, Alvaro Reinoso alvrein...@gmail.com wrote:
Hello,
I got this error when I've tried to relate some classes
('items').filter(Item.typeItem == zeppelin/
channel).order_by(Channel.titleView).all()
I just need some values many times, I don't need to retrieve the whole
object.
Thanks in advance!
On Aug 3, 1:40 am, Kalium raymond.ma...@gmail.com wrote:
On Aug 3, 8:43 am, Alvaro Reinoso alvrein
Hello,
I have these classes where items (class Item) is related to channel
object. Channel can contain many items:
channel_items = Table(
channel_items,
metadata,
Column(channel_id, Integer,
ForeignKey(channels.id)),
Column(item_id, Integer,
40 matches
Mail list logo