mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-20 15:10:58 +00:00
1 line
1.2 KiB
JSON
1 line
1.2 KiB
JSON
[{"user_id": 3617, "stars": [], "topic_id": 17165, "date_created": 1301903683.7706959, "message": "I'm working up a slightly more complex wiki-app as a test and I have a page model that has many revisions. I'm storing page content in the revision.", "group_id": 2163, "id": 521468}, {"user_id": 3617, "stars": [], "topic_id": 17165, "date_created": 1301903688.8669269, "message": "Does it make sense to have a field for current_revision in the page model so I don't need a seperate query to find the latest page revision or is there a better way to go about that?", "group_id": 2163, "id": 521470}, {"user_id": 3617, "stars": [], "topic_id": 17165, "date_created": 1301978258.943038, "message": "Solution was pretty simple.\nModel: revisions = orm.relationship(Revision, order_by=sa.desc(Revision.id), backref=\"page\")\nTemplate: ${page.revisions[0].content}", "group_id": 2163, "id": 534864}, {"user_id": 16188, "stars": [], "topic_id": 17165, "date_created": 1302378171.156189, "message": "I often add a \"active_whatever\" to my main model for that sort of stuff... so Page.active_revision_id (and the simple relationship Page.active_revision)", "group_id": 2163, "id": 605107}] |