OJS development discussion, enhancement requests, third-party patches and plug-ins.
Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher
The OJS Technical Reference
and the OJS API Reference
are both available from the OJS Documentation
You can access our public Git Repository here
. Comprehensive Git usage instructions are available on the wiki
You can access our Bugzilla report tracker here
You can use our Google Custom Search
to search across our main website, the support forum, and Bugzilla.
Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion
subforum; if you have a technical support question, try the OJS Technical Support
I've been studying OJS 2.1. code and am trying to figure out how Model Classes get their unique ID's. For example, Article::setArticleId is given an id and sets the parent Data Object accordingly. However, where is the unique articleID that is given to Article::setArticleID created and what mechanism ensures that it is unique (I'd assume that assurance that its unique can only come from DB layer rather than application layer?
- Posts: 31
- Joined: Fri Jul 11, 2008 10:57 am
You are correct in assuming that this mechanism is done at the database level--The article ID is the primary key for the articles table and is auto-incremented after every insert. The setArticleId function is used to assign the article id to a PHP article object, and it gets its parameter from the database.
Hope that clears things up a bit,
Public Knowledge Project Team
- Posts: 952
- Joined: Mon May 05, 2008 10:29 am
- Location: Vancouver, BC
Return to OJS Development
Who is online
Users browsing this forum: No registered users and 2 guests