On Mon, Feb 1, 2010 at 9:09 AM, Fernando Correa Neto <[email protected]> wrote:
> Hello,
>
> I think that quoting the table fields would solve the problem.
Right; Alec, you will also need to inherit from the Storm base class
tosupport the quoted references. It should look like this:
class Article(Storm):
"""
This is a Storm table: articles
"""
__storm_table__ = "articles"
id_ = Int(primary=True)
url_id = Unicode()
title = Unicode()
tags = Unicode()
author = Unicode()
timestamp = Unicode()
content = Unicode()
comments = ReferenceSet(id_, 'Comment.article_id')
comment_count = len(comments)
ip = Unicode()
active = Int()
class Comment(Storm):
"""
This is a Storm table: articles
"""
__storm_table__ = "comments"
id_ = Int(primary=True)
author = Unicode()
article_id = Int()
article = Reference(article_id, 'Article.id_')
thread_id = Int()
timestamp = Unicode()
email = Unicode()
website = Unicode()
text = Unicode()
--
storm mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/storm