Hi all, ive used oil to generate a model for me, see below. It did not add created_at and updated_at to the $_properties array. If I now add something to this model:
$user = new Model_User($user); $user->save();
Now both created_at and updated_at are 0 in the database. This had me stumped for quite a while.
But if I manually add created_at and updated_at to the $_properties array, both values get set correctly. So it seems like either oil isnt creating the $_properties array correctly, or the orm code is looking for those 2 fields in the wrong place.
Or of course, im doing something wrong?
class Model_User extends \Orm\Model { // columns we operate on protected static $_properties = array( 'username', 'group', 'email', 'last_login', 'login_hash', 'profile_fields', );
I've just generated some code using scaffolding (on 1.5/develop), and everything seems to be there: properties, observers, and columns in the migration.
What commandline did you exactly use to generate the code? And with which version of Fuel?
According to the "oil console" output, you're already on 1.5-dev.
I use it in production everywhere, it's the quickest way for me to find stability issues. Most people stay on 1.4, so issues with 1.5 will only be reported after release, and I would like to see then before... ;-)
I've looked in the code, and it looks like a bug: the properties list is generated before checking if the timestamp fields need to be added. I'll fix that later today.
A submodule is a reference to a specific commit, after installing them your modules are 'headless', they don't point to any branch. If yours point to a specific branch, you must have done a "git checkout", or you use a tool which does.
Mixing versions might cause problems, there are dependencies between packages and some of the core classes. It's best to keep it all the same version as long as we haven't sorted the tight coupling issue.
No, submodules are pinned on a specific commit hash, which is not related to any particular branch, it's just a snapshot of the repo frozen in time.
In general the references should be in sync, but as it is a lot of manual updating to keep them in sync, it is possible that they not up to date.
However, for every release we try to make sure the references in fuel/fuel point to the last commit in the master branch of the corresponding version in all submodules.