wow Aaron, this looks sweet...it doesn't work on this stupid server (damn crystaltech), but I will try it at home where the good server lives :). Thanks so much for this. I will try all of this and report back to you guys. thanks for all the speedy help! - Derek On Thu, 7 Dec 2006 16:10:01 -0600, "Aaron Lynch" <[EMAIL PROTECTED]> said:
Never found any great docs on it... Instantiate an Iterator and pass it to this custom tag. read some of the metadata on it. [1]http://ajlcom.instantspot.com/blog/index.cfm/2006/5/12/Document-Your-ObjectsDynamically On 12/7/06, Derek Perez <[2] [EMAIL PROTECTED]> wrote: Thanks Aaron, do you have any idea where I could read about the Iterator objects? I haven't found any good resouces for using those...I don't really know much about them at all! Thanks! - Derek PS: Someone ought to write a nice article or something about iterators :) On Thu, 7 Dec 2006 15:40:48 -0600, "Aaron Lynch" <[3] [EMAIL PROTECTED]> said: loop over something like this for x number of permissions you want to add... NewRole = User.getPermissionIterator().add(); NewRole.setValue(); NewRole.setSomeOtherValue(); for each new role, then do User.Save() I think that is what you need. On 12/7/06, Teddy Payne <[EMAIL PROTECTED] > wrote: My first thought was that you just create one record object for the permission table. If you know the userID, you load up the permission record and then save the record. I believe there is a method on the record object that clears out the data. So in essence, you just loop over the array, load the reocrd object up and save them and then at the end of the loop you clean up the record object. This really prevents create anymore than one record object for the permissions table. Teddy On 12/7/06, Derek Perez <[EMAIL PROTECTED] > wrote: Hey everyone, hope you all are having a productive week. I am in the process of writing a user account system with reactor....and I am somewhat stuck on a conceptual level of how I should accomplish this task. I have a "user" table, a "permission" table, and a "userPermissionJoin" table. There is a list of permissions that a user from the user table can have from the permissions table (thus the need for the userPermissionJoin table). Hope that makes sense...so heres the issue: I saw the documentation on how to add: <!--- create a customerRecord ---> <cfset CustomerRecord = Reactor.createRecord("Customer") /> <!--- get the user record's address ---> <cfset AddressRecord = CustomerRecord.getAddress() /> <!--- populate the customer and address ---> <cfset CustomerRecord.setUsername("jblow") /> <cfset CustomerRecord.setPassword ("9ummy") /> <cfset CustomerRecord.setFirstName("Joe") /> <cfset CustomerRecord.setLastName("Blow") /> <cfset AddressRecord.setStreet1("1234 Left Turn Ln.") /> <cfset AddressRecord.setCity("Albuquerque") /> <cfset AddressRecord.setState("New Mexico") /> <cfset AddressRecord.setZip("87112") /> <!--- save the customer and address! ---> <cfset CustomerRecord.save() /> okay fine and good, but what happens if I have a list or an array of permission ID's that I need to have appended to a single user record? can someone help me try to understand what the best method of handling this is? Thanks so much for your help!! have a great day! - Derek -- Derek Perez [EMAIL PROTECTED] -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [EMAIL PROTECTED] Archives at: [8]http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <cf_payne /> Adobe Certified ColdFusion MX 7 Developer Atlanta CFUG (ACFUG): [9]http://www.acfug.org -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [EMAIL PROTECTED] Archives at: [11]http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Aaron Lynch [12]www.AaronJLynch.com [13]www.WorldWildWeb.biz [14]www.InstantSpot.com -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [EMAIL PROTECTED] Archives at: [16]http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Derek Perez [EMAIL PROTECTED] -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [EMAIL PROTECTED] Archives at: [19]http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Aaron Lynch [20]www.AaronJLynch.com [21]www.WorldWildWeb.biz [22]www.InstantSpot.com -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- References 1. http://ajlcom.instantspot.com/blog/index.cfm/2006/5/12/Document-Your-ObjectsDynamically 2. mailto:[EMAIL PROTECTED] 3. mailto:[EMAIL PROTECTED] 4. mailto:[EMAIL PROTECTED] 5. mailto:[EMAIL PROTECTED] 6. mailto:[EMAIL PROTECTED] 7. mailto:[email protected] 8. http://www.mail-archive.com/reactor%40doughughes.net/ 9. http://www.acfug.org/ 10. mailto:[email protected] 11. http://www.mail-archive.com/reactor%40doughughes.net/ 12. http://www.AaronJLynch.com/ 13. http://www.WorldWildWeb.biz/ 14. http://www.InstantSpot.com/ 15. mailto:[email protected] 16. http://www.mail-archive.com/reactor%40doughughes.net/ 17. mailto:[EMAIL PROTECTED] 18. mailto:[email protected] 19. http://www.mail-archive.com/reactor%40doughughes.net/ 20. http://www.AaronJLynch.com/ 21. http://www.WorldWildWeb.biz/ 22. http://www.InstantSpot.com/ -- Derek Perez [EMAIL PROTECTED] -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
