Log message #108734

# At Username Text
# Aug 7th 2008, 04:49 alkemann i will definitivly take a look at it
# Aug 7th 2008, 04:48 achew22 not to make it complicated or anything
# Aug 7th 2008, 04:48 achew22 alkemann: if you mixed versioning with logging with polymporphic you would be able to do it
# Aug 7th 2008, 04:48 JeffEmbracedDC alkemann: cool :)
# Aug 7th 2008, 04:47 alkemann JeffEmbracedDC: belongsTo, since the key is in that model
# Aug 7th 2008, 04:47 alkemann be hard to make it totally general though, would have to be associated with the specific Version behavior i think
# Aug 7th 2008, 04:47 JeffEmbracedDC Martz: in your join table model... is in belongsTo or hasOne back associations?
# Aug 7th 2008, 04:46 achew22 alkemann: you could do both, associate the log change with a shadowtable's element id
# Aug 7th 2008, 04:45 alkemann it'd be a bit complicated, it is an obvious step. But i was thinking maybe if u want that, its better to use the Versioning beahvior with shadowtables?
# Aug 7th 2008, 04:45 achew22 martz its in saved-bin it won't ever go away just go to bin.cakephp.org and search for alkemann logable
# Aug 7th 2008, 04:44 achew22 is it possible to get it to log the value changes?
# Aug 7th 2008, 04:44 achew22 hey-- that's cool
# Aug 7th 2008, 04:44 Martz ACTION bookmarks
# Aug 7th 2008, 04:43 alkemann all u need right here http://bin.cakephp.org/saved/35826
# Aug 7th 2008, 04:43 achew22 google code = 30 sec
# Aug 7th 2008, 04:43 achew22 use one of the free services
# Aug 7th 2008, 04:43 Martz i throw everything in repos :P
# Aug 7th 2008, 04:43 Martz perhaps
# Aug 7th 2008, 04:42 alkemann bit overkill for just a behavior though isnt?
# Aug 7th 2008, 04:42 Martz i can set one up for you if you like
# Aug 7th 2008, 04:41 Martz do you want one?
# Aug 7th 2008, 04:41 alkemann no sorry
# Aug 7th 2008, 04:41 Martz alkemann: sure I will at some point. I've got a quick project to do first which wont need any logging (all image uploads and resizing with AD7Sixs attachment behavior :D) but i'll give it a shot. Do you have an SVN you can throw it in?
# Aug 7th 2008, 04:40 Martz alkemann: sure. and it has it uses, as you said with Users.. ACL with aro/aco/axo etc works great HABTM with meta data, but it has custom methods to handle all of that automagically
# Aug 7th 2008, 04:40 alkemann Martz: so, u wanna test my behavior and see if u got some feature requests or bugs or something?
# Aug 7th 2008, 04:39 alkemann Martz: i sorta agre. I have only used it for the created field and a boolean for if its two-way
# Aug 7th 2008, 04:37 alkemann sorry GroupsUser probably
# Aug 7th 2008, 04:37 Martz JeffEmbracedDC: it goes back to my point before: why have a join table, then stuff it full of meta data - and end up rebinding it as hasOne, using 'with' and all of the downsides and complexities.. when you could use a third "real" model instead of the join table and life would be much easier
# Aug 7th 2008, 04:37 JeffEmbracedDC alkemann: interesting.. I should maybe try that
# Aug 7th 2008, 04:37 alkemann Users HABTM Groups => Model UsersGroup
# Aug 7th 2008, 04:36 alkemann in fact cake makes a model for all habtm relationships
# Aug 7th 2008, 04:36 alkemann JeffEmbracedDC: u can make the with model in same way as other models
# Aug 7th 2008, 04:36 JeffEmbracedDC alkemann: works great in my opinion.. only downside I've come across so far.. is.. I'm not sure how you add beforeSave/afterSave/whatever functions to the faux model.. or if it's possible at all.
# Aug 7th 2008, 04:36 stevieboy pgcd: it's always good to have an open eye. but mostly you can check the manual for the helpers provided. if you arent lucky there, try it the normal way
# Aug 7th 2008, 04:36 pgcd as somebody said, sometime it's quicker to just reinvent the wheel =)
# Aug 7th 2008, 04:35 pgcd stevieboy: that is good advice - it might save me a lot of time down the road if i just *do* things instead of perusing manual api and google to see if there's something else that does it
# Aug 7th 2008, 04:35 alkemann Martz: JeffEmbracedDC when using a with I have been forced to add an id field and put it as primary key, but that has worked well
# Aug 7th 2008, 04:35 JeffEmbracedDC Martz: Gotchya
# Aug 7th 2008, 04:35 Martz JeffEmbracedDC: im aware it exists, I played with it, but I dont use it
# Aug 7th 2008, 04:34 Martz JeffEmbracedDC: the downside, which someone pointed out to me, is that mysql isnt able to "ensure integrity" of not having the same 2 foreign keys, since they are not primary keys like in a HABTM join table. However that is solveable with validaiton and checking at the PHP level
# Aug 7th 2008, 04:34 JeffEmbracedDC Martz: well...... are you familiar with 'with' associations? which allow for added meta data and faux model access of the join table?