Mark,
i solved your second question in this way: i developed an abstract service
layer in which I inject dataMgr for database operations; in my object, I
have a custom tag attribute <cfproperty name... mapTo="myTable"/> so when I
have to persist my object I pass it to may service layer save() method,
where a new struct is defined and passed to insertRecord() or save Record().
Also, i define my object component with other custom attributes, one is for
cf componenent tag: <cfcomponent ... table="myTable"/> so I simply call the
service layer save(myObj) and it has all, from metadata, to save record in
the proper table with the proper mapping.
Hope been clear and usefull
salvatore
-----Messaggio originale-----
Da: datamgr@googlegroups.com [mailto:datamgr@googlegroups.com] Per conto di
Mark
Inviato: sabato 23 aprile 2011 12.23
A: DataMgr
Oggetto: [DataMgr] saveRecord Behaviour Understanding Problem
Hi, I just started using DataMgr and have a little problem with
understanding what saveRecord does. I tought that if I do not pass a
value for the primary key it automatically inserts a now record - but
what it does is updating the record for the primary key. So when does
saveRecord inserts a new record ?
An other question is. Is it posssible to map the structure keys to
column names inside DataMgr. So that one does not have to change every
part of code if a column name changes.
Thanks for your help.
Mark
--
You received this message because you are subscribed to the Google Groups
"DataMgr" group.
To post to this group, send email to datamgr@googlegroups.com.
To unsubscribe from this group, send email to
datamgr+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/datamgr?hl=en.