Re: created-filed in db-table

2007-03-19 Thread sunertl
Oh I please do not get me wrong! I really love the concept of cake and the restrictions it has because it really made me a better and tidier programmer since I use it. But sometimes - and really only sometimes - it lacks of fallback options. Like in this case. As far as I understand the code it ch

Re: created-filed in db-table

2007-03-19 Thread sunertl
hm... I wrote a pretty long answer but somehow it was not posted?!?! damn. ok, again but a little bit shorter. I have to use the unix timestamp because it is obligatory in our company. Using datetime simply would lead to not getting my app approved. Changing the name is the way I use now. But I

Re: created-filed in db-table

2007-03-19 Thread Langdon Stevenson
> I worked around the problem by changing the name but in my opinion > this is not how it should work. Ok, so you are only concerned about the data type. As I suggested you could get around this issue using callbacks: beforeSave() to change the Unix timestamp to a Cake friendly date/time on sa

Re: created-filed in db-table

2007-03-19 Thread sunertl
I worked around the problem by changing the name but in my opinion this is not how it should work. Currently I am developing a system for project management in cake and we need the unix timestamp for interchanging purposes. It is the format which is understood by all of our (non-cake-)systems wit

Re: created-filed in db-table

2007-03-19 Thread Langdon Stevenson
Hi sunertl I don't use 1.2 yet, but in I expect that it is the same as 1.x the field 'created' (and the field 'modified') are special fields in Cake. It will automatically update these fields for you when you create and save models. They do require the data type of date/time to work and wil

created-filed in db-table

2007-03-19 Thread sunertl
I use the (amazing) 1.2 alpha-release for a few days now and have problems with fields named "created" in db-tables. For some reasons I do not use datetime but integer for "created". Cake seems to have problems with that because I always get errors in line 1052 in cake/ model/model.php. I tried to