There will be user accounts in the user table, and there will be possible
permissions in the permission table that a user account could be granted. so
say your UserID is 5, and you want permission 23,46, and 67. the
UserPermissionJoin table will have 3 records with the same UserID and those
three different PermissionID's.
will that scenario work with your idea? and do you find there to be a problem
with that?
Thanks!
- Derek
On Thu, 7 Dec 2006 16:33:50 -0500, "Teddy Payne" <[EMAIL PROTECTED]> said:
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: [4]http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
--
<cf_payne />
Adobe Certified ColdFusion MX 7 Developer
Atlanta CFUG (ACFUG): [5]http://www.acfug.org
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
References
1. mailto:[EMAIL PROTECTED]
2. mailto:[EMAIL PROTECTED]
3. mailto:[email protected]
4. http://www.mail-archive.com/reactor%40doughughes.net/
5. http://www.acfug.org/
--
Derek Perez
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --