last edited byusericonadmin on 29-Apr-2010

Contents

Advanced Debugging

TODO

Viewing the generated Hibernate XML mapping files

Hibernate makes use of various XML files for its configuration. A mapping file is automatically generated by ColdFusion which tells Hibernate what table in the database it has to access, and what columns in that table it should use.

A separate mapping file is created for each component and has the file name YourComponentName.hbmxml.

To save the hibernate mapping that is generated, you need to set the ORM savemapping flag to true within your Application.cfc file:

this.ormsettings.savemapping = true;

The mapping files will be saved to the same directory as your application.

Note that if you are saving your generated mapping files and you change your corresponding components, then you will either need to delete your mapping file or update it manually to reflect the changes to your component.

CFML References

ColdFusion-ORM: Using CRUD Functions
http://www.manjukiran.net/2009/07/14/coldfusion-orm-using-crud-functions/

ColdFusion 9 debugging hibernate schema exports
http://www.danvega.org/blog/index.cfm/2009/8/25/ColdFusion-9-debugging-hibernate-schema-exports

General References

Hibernate Tutorial - The mapping file
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/tutorial.html#tutorial-firstapp-mapping