Hi, I use Transfer with my application. I have 3 tables: users, applications and users-applications. Every user has access to his/her application(s) but an admin user has access to _all_ applications.
The Transfer config file contains a many-to-many relationship between table users and applications (via users-applications). When a user logs in, I check if he has a role 'admin' (there is a table 'roles', 'users' and 'users-roles' to find this out). If a user is an admin I retrieve all applications via transfer.list(). This returns a cursor (=query resultset) with columns name, title, id for all applications. If a user is not an admin, I get all the applications a user has access to via getApplicationsArray(). This gives me an array of transfer objects. Each transfer object contains getTitle(), getName() etc to retrieve info about the application is represents. Now I want 1 type of result: either a cursor or an array of objects instead of an array of objects in case user is not 'admin' and a cursor in case a user is admin. I want this because when I display the applications info I can assume I have a query resultset OR an array of objects. I do not want to check the applications key like in 'is this a cursor? Then do this. Else, do that' to show application info. I have not found in the docs how to get an array of objects (representing rows) from a transfer object - that is, a single table OR how to get a cursor contaoinin gall application info from a many-to- many relation between two tables. What is the best aproach to this? Thanks, Marc -- Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer Try out the new Transfer ORM Custom Google Search: http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8 You received this message because you are subscribed to the Google Groups "transfer-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en
