Marc, Sorry you are having trouble with this. We've not done a very good job of documenting the new CF9 Hibernate interactions in Model Glue and this is one of the main reasons we've not fully released the code yet. We could use a hand with this if you are so inclined.
I'm a little sketchy myself about the particulars of the CF9 Plugin, but scaffolding always generates the XML definitions in a file called scaffolds.xml (or something similar). This should be in your config directory. By default, these options should be enabled: - Display a "master list" of records in a table - Display an editing form capable of editing both a record's data and its relations to other tables (one-to-many and many-to-many) - Display a read-only view of a record - Update a record's data - Delete a record There are ways to limit this, by changing the scaffold tag, but the default is to generate the above. If your data is not saving, it is possibly because the Hibernate mappings are not correct. Sometimes this happens when the primary key is not set. All of the generated CFM view files are located in the /model/generated directory (unless this was renamed in the ModelGlueConfiguration. I believe all of the list methods are looking for a query. The display and edit methods are looking for beans. You may wish to verify this with your generated code. We made a lot of effort in making the generated code easy to read. I'm sure others will weigh in on this, but post back what you find. And should you be in a place to help us out with some details we can add to the documentation to help folks like yourself, I'd be very much appreciative. DW On Thu, Jan 5, 2012 at 10:08 AM, marc <[email protected]> wrote: > Hi, > I have a sample app that uses scaffolding to add, opdate and show data > from a table "pages". I have configured scaffolding in Coldspring.xml and > told MG I use Hibernate for an orm by adding the lines > > <alias alias="ormAdapter" name="ormAdapter.cfORM" /> > <alias alias="ormService" name="ormService.cfORM" /> > > No other ORM frameworks (Transfer,Reactor) are configured here > Also I have configured the CF app for orm by setting > this.ormenabled="true"and adding the necessary ormsetting parameters in > Application.cfc. I also have a page.cfc that is set to persistent so all > actions to manage data to should be managed here. It has an init and a List > handler that returns EntityLoad("page"). > > MG displays an listpage and, when clicking the "add page" link there, an > edit page. That form shows all the properties defined in my ORM's page.cfc > so it seems MG can talk to Hibernate. > > The "pages" table is empty so I want to add data by filling in the edit > form. When I fill and submit that form, nothing is added to the pages table > so I think I miss something here... > > Do I have to add list,view,edit,commit,delete functions to the page > controller and have those in turn call the corresponding functions in the > ORM (page.cfc)? > Do I have to add create list,view,edit,commit,delete functions to the > page.cfc entity? > What datastructures is the generated view expecting when displaying data? > A query resultset? An array of beans? > > Sorry for asking basic questions but I am new to Scaffolding and this is > my first try with Hibernate. Also, I don't find this mentioned in the docs > @ http://docs.model-glue.com/wiki/HowTos/HowToUseScaffolds#Scaffolds > Thanks, > > Marc > > -- > Model-Glue Sites: > Home Page: http://www.model-glue.com > Documentation: http://docs.model-glue.com > Bug Tracker: http://bugs.model-glue.com > Blog: http://www.model-glue.com/blog > > You received this message because you are subscribed to the Google > Groups "model-glue" 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/model-glue?hl=en -- Plutarch - "The mind is not a vessel to be filled but a fire to be kindled." -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" 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/model-glue?hl=en
