Storing representation of dates, while not complex, really comes down to what you want to do with them and the granularity you wish to work at. You have several options - and different people have different personal preferences and it boils down to where you want to do the processing.
Remember - what you store - isn't necessarily what you present. You can always accept date ranges in the model - and store it differently in the db. 1) Continue as you are, represent days as single records and shift the processing up a level to the model 2) Store dates as weeks in the DB - here your object would be have a week represented and you'd compress/uncompress the information in the model 3) Store start and end dates in the DB On Fri, 02 Oct 2009 18:28:54 +0200, MoUeTtE <the.moue...@gmail.com> wrote: > > Hi everybody, > I'm currently developing an application in which I have to create > objects that is linked to a week day. > Up to now, I select the weekday for every object, but most of the time > every field in the object is the same except this weekday. > > What would be the best practice to have the user fill the form only > once ? > > in order to be clearer, i'll give you a sample of what I mean. > > schema.yml > > propel: > object: > id: ~ > name: varchar(255) > weekday: integer > > link_user_object: > user_id: ~ > object_id: ~ > > let's say I want to create an object called 'Test' for days from > Monday to Friday, up to now I have to create one for Monday, one for > Tuesday... you got it, it turns out to be too long (I actually have a > lot of data to fill in) > > So, my question is what is the best practice to have my form save > method creating several object after I changed the weekday widget > 'multiple' option to true ? Should I use another foreign table to > store the weekday only ? I'm afraid it could make the application > slower (up to A request out of 2 are concerning this table), and > performances are critical. > > Hope I made myself clear, > > Julien > > -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---