Log message #110934

# At Username Text
# Aug 8th 2008, 02:01 pgcd mscdex: make sure you use the correct HABTM declaration, though =)
# Aug 8th 2008, 02:01 mscdex thanks
# Aug 8th 2008, 02:01 mscdex ah ok, i'll try that out and see what happens
# Aug 8th 2008, 02:01 pgcd anybody here conversant with prototype, btw? I have a situation where document.viewport returns the wrong data...
# Aug 8th 2008, 02:00 pgcd mscdex: sorry, that HABTM declaration syntax was wrong, hope you know what i mean
# Aug 8th 2008, 01:58 pgcd i think that way you get the correct SQL (convention over configuration, etc)
# Aug 8th 2008, 01:57 pgcd dependency_id
# Aug 8th 2008, 01:57 pgcd and your second id should be simply
# Aug 8th 2008, 01:57 pgcd dependencies_packages
# Aug 8th 2008, 01:57 pgcd and your join table should be called
# Aug 8th 2008, 01:57 pgcd $hasAndBelongsToMany('Dependency'=>array('className'=>'Package'))
# Aug 8th 2008, 01:56 mscdex er packages rather
# Aug 8th 2008, 01:56 mscdex correct, they both point to records/ids located in Package
# Aug 8th 2008, 01:56 pgcd in that case, your model should read something like:
# Aug 8th 2008, 01:55 pgcd so package_dependencies is your 2-columns standard join table, except that both ids are related to one table, right?
# Aug 8th 2008, 01:54 mscdex i read through the docs and join tables were only mentioned in HABTM part
# Aug 8th 2008, 01:54 mscdex i do not know to be honest, i am still learning at this point
# Aug 8th 2008, 01:54 pgcd yeah you do, sorry
# Aug 8th 2008, 01:53 pgcd are you sure you need a HABTM, tho?
# Aug 8th 2008, 01:53 pgcd so as to basically use different foreign keys and aliases for the same table
# Aug 8th 2008, 01:52 pgcd well, not really - try the way i suggested
# Aug 8th 2008, 01:52 mscdex it's a package management system basically, so i need to keep track of dependency packages
# Aug 8th 2008, 01:52 pgcd mscdex: oh, ok, that's different then
# Aug 8th 2008, 01:51 mscdex if that helps any
# Aug 8th 2008, 01:51 mscdex and both of those id's would point to records in Package
# Aug 8th 2008, 01:51 foxmask yyo
# Aug 8th 2008, 01:51 pgcd mscdex: same here
# Aug 8th 2008, 01:51 mscdex i have a model "Package" and a table "package_dependencies" which has a "package_id" and a "package_dependency_id"
# Aug 8th 2008, 01:51 pgcd so you add a modelA->habtm('modelB'=>array('className'=>'modelA','conditions'=>'etc','foreignKey'=>'etc)
# Aug 8th 2008, 01:50 pgcd you have modelA that needs to self join
# Aug 8th 2008, 01:50 pgcd i'm not sure i explained myself, but:
# Aug 8th 2008, 01:49 mscdex hmm
# Aug 8th 2008, 01:48 pgcd mscdex: you can also try with using an alias for the name of the associated model, maybe
# Aug 8th 2008, 01:46 pgcd mscdex: i think you can search for something to do with self joins, even though i haven't read anything on the topic yet
# Aug 8th 2008, 01:44 mscdex hello, where can i find out how to set up a HABTM for a join table that contains two fields that refer to the same model?
# Aug 8th 2008, 01:44 pgcd ACTION would appreciate any kind of help making the d*mn thing align with the top of the viewport
# Aug 8th 2008, 01:43 pgcd ACTION is freaking out over lightbox
# Aug 8th 2008, 01:43 pgcd morning florent
# Aug 8th 2008, 01:42 pgcd seedbaker: if you use firebug, you can check the response to the ajax request
# Aug 8th 2008, 01:39 florent guten morgen primeminister
# Aug 8th 2008, 01:38 florent good morning everyone