Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add any pk ids to the followers #18

Open
sh4nks opened this issue Nov 27, 2013 · 0 comments
Open

Can't add any pk ids to the followers #18

sh4nks opened this issue Nov 27, 2013 · 0 comments

Comments

@sh4nks
Copy link

sh4nks commented Nov 27, 2013

Hey,

I have been playing a bit with your fbone and figured out that your DenormalizedText type doesn't work :/

>>> user = User.query.filter_by(id=1).first()
2013-11-27 18:43:57,552 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
2013-11-27 18:43:57,555 INFO sqlalchemy.engine.base.Engine SELECT users.password AS users_password, users.id AS users_id, users.name AS users_name, users.email AS users_email, users.openid AS users_openid, users.activation_key AS users_activation_key, users.created_time AS users_created_time, users.avatar AS users_avatar, users.role_code AS users_role_code, users.status_code AS users_status_code, users.user_detail_id AS users_user_detail_id, users.followers AS users_followers, users.following AS users_following 
FROM users 
WHERE users.id = ?
 LIMIT ? OFFSET ?
2013-11-27 18:43:57,555 INFO sqlalchemy.engine.base.Engine (1, 1, 0)
>>> user.followers.add(1)
>>> user.followers
set([1])
>>> db.session.add(user) # normally you don't need to do this.. but I want to be sure that everything is added 
>>> db.session.commit()
2013-11-27 18:46:23,833 INFO sqlalchemy.engine.base.Engine COMMIT
>>> user.followers
2013-11-27 18:46:35,899 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
2013-11-27 18:46:35,902 INFO sqlalchemy.engine.base.Engine SELECT users.password AS users_password, users.id AS users_id, users.name AS users_name, users.email AS users_email, users.openid AS users_openid, users.activation_key AS users_activation_key, users.created_time AS users_created_time, users.avatar AS users_avatar, users.role_code AS users_role_code, users.status_code AS users_status_code, users.user_detail_id AS users_user_detail_id, users.followers AS users_followers, users.following AS users_following 
FROM users 
WHERE users.id = ?
2013-11-27 18:46:35,902 INFO sqlalchemy.engine.base.Engine (1,)
set([])
>>> user = User.query.filter_by(id=1).first()
2013-11-27 18:46:44,414 INFO sqlalchemy.engine.base.Engine SELECT users.password AS users_password, users.id AS users_id, users.name AS users_name, users.email AS users_email, users.openid AS users_openid, users.activation_key AS users_activation_key, users.created_time AS users_created_time, users.avatar AS users_avatar, users.role_code AS users_role_code, users.status_code AS users_status_code, users.user_detail_id AS users_user_detail_id, users.followers AS users_followers, users.following AS users_following 
FROM users 
WHERE users.id = ?
 LIMIT ? OFFSET ?
2013-11-27 18:46:44,414 INFO sqlalchemy.engine.base.Engine (1, 1, 0)
>>> user.followers
set([])
>>> 

Or am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant