I'd recommend changing "field" to "property", but that's just because my natural inclination is to describe ORM as mapping object "properties" to database "columns".
Cheers, Joe On 2/9/06, Miller, Ryan <[EMAIL PROTECTED]> wrote: > > It seems like a lot of people like this idea. Lets agree on a config xml > format before any coding happens. I'd be totally happy to take on the work > of doing this. If the end results are quality then maybe Doug will adapt > it. > > <object name="SomeClass" table="SomeTable"> > <fields> > <field name="someID" column="ID" /> > <field name="name" column="some_name" /> > </fields> > </object> > > > There's probably more that could be added to the field node for attributes, > for example, what if you want to do some kind of type conversion, but this > seems like a good place to start. > > > > > ________________________________ > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tormod > Boga > Sent: Thursday, February 09, 2006 10:50 AM > To: [email protected] > Subject: RE: Reactor For CF Object Relational Mapping > > > Hmm.. I thought I tried that, and couldn't make it work.. I'll get the > latest from SVN and try it again tomorrow when I get back to work.. > > At 11:43 09.02.2006 -0700, you wrote: > > Just so you are aware, you can use aliases when working with the table/view > name, just not the field names. > > This can be done in the config xml file by adding the 'alias="newtablename"' > to the <object> tag. > > Michael > > ________________________________ > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tormod > Boga > Sent: Thursday, February 09, 2006 11:36 AM > To: [email protected] > Subject: Re: Reactor For CF Object Relational Mapping > > I agree with both of you.. A thing like this would be great. > I have previously requested the feature of adding aliases to the > table/object names, because I have to deal with tables named tblxxx too.. > The code would look alot nicer if the generated objects had discarded the > 'tbl' prefix (by giving it an alias). > Doing the same thing for columns would be great as well.. > > > At 12:29 09.02.2006 -0600, you wrote: > > I think this would be great as sometimes I have to use legacy named tables > with the 'tbl' prefix. I also like to name my tables in plural, "users", > "orders", but I like to have my objects singular, "user", "order". I also > like to name my columns in the db with an underscore, but my methods are > camelCase. Of course, this probably adds a level of complexity that Doug > may not want to attempt. > > > On 2/9/06, Miller, Ryan <[EMAIL PROTECTED]> wrote: > > To follow up my questions on Views and in relation to the other discussion > about only saving certain values. > > Is adding some mapping capability to the config xml been discussed or > planned? > > Or does this little community prefer doing it's mappings via Views? > > I'm thinking about diving into the code to add support for something like > this in the config xml > > <object name="SomeClass" table="SomeTable"> > <fields> > <field name="someID" column="ID" /> > <field name="name" column="some_name" /> > </fields> > </object> > > I thought I'd just float the idea here to see if this has been discussed or > tried already before jumping in with both feet. > > Thanks, > Ryan Miller > > > -- > Marlon > / Tormod Boga > / [EMAIL PROTECTED] > > > __________ NOD32 1.1401 (20060209) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.nod32.com > > / Tormod Boga > / [EMAIL PROTECTED] -- Get Glued! The Model-Glue ColdFusion Framework http://www.model-glue.com

