| Yeah, but that doesn't help in a case where someone like PayPal is forcing column names like... oh, lemme check the doco for a good one: address_country_code = US address_country = United States Or this whole block here: address_name = Jared Rypka-Hauer address_street = 123 Sesame St. address_city = Burnsville address_state = MN address_zip = 55121 address_country = United States address_country_code = US address_status = confirmed Those are the names of fields that come in from PayPal either on the URL or in a form post (PDT = URL, IPN=POST data) and I either map them by hand (and when there's over 100 different varieties!) if they change or add to them... icky) or use a tool of some sort. I'm planning to add mappings to PayPalMX (I think) but for now the ability to set mappings from the incoming block of instanity to something more legit. Something obviously has to be done to allow for the fact that data coming in for a new record is going to look like the above (which will be the column names in the DB) and set that data to the right fields in the object... something like: <!--- where mappings has format mappings[oldName] = newName ---> <cfloop collection="mappings" item="i"> <cfif structKeyExists(arguments,i)> <cfset myField = arguments[i]> <cfelseif structKeyExists(arguments,mappings[i])> <cfset myField = arguments[mappings[i]]> </cfif> </cfloop> That would effectively grab the data from the incoming data block whether it was named by the DB convention (underscores?) or by the ORM convention (camelCase?). The only real question is where to put it... perhaps in a setInstance() method? Dunno. I'd have to study that a bit more. But... there's my 49 cents on the subject. :) Laterz, J ------------------------------------------------ Jared C. Rypka-Hauer Continuum Media Group LLC Member, Team Macromedia - ColdFusion "That which does not kill me makes me stranger." - Yonah Schmeidler On Feb 9, 2006, at 12:43 PM, Michael Lantz wrote:
|
- Re: Reactor For CF Object Relational Mapping Jared Rypka-Hauer
- Re: Reactor For CF Object Relational Mapping Joe Rinehart
- Re: Reactor For CF Object Relational Mapping Joe Rinehart
- Re: Reactor For CF Object Relational Mapping Jared Rypka-Hauer
- Re: Reactor For CF Object Relational Mapping Marlon Moyer
- Re: Reactor For CF Object Relational Mapping Tormod Boga
- RE: Reactor For CF Object Relational Mapping Michael Lantz
- RE: Reactor For CF Object Relational Mapping Doug Hughes
- RE: Reactor For CF Object Relational Mapping Tormod Boga
- Re: Reactor For CF Object Relational Mapping Jared Rypka-Hauer
- Re: Reactor For CF Object Relational Mappin... Kurt Wiersma
- RE: Reactor For CF Object Relational Mapping Miller, Ryan
- RE: Reactor For CF Object Relational Mapping Michael Lantz
- RE: Reactor For CF Object Relational Mapping Tormod Boga
- RE: Reactor For CF Object Relational Mapping Doug Hughes

