|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Creating Indexes with ORM
I'm just starting to play around with CF 9's ORM some, and I love that IEric Cobb 04/18/12 10:30 A > I'm just starting to play around with CF 9's ORM some, and I love that IDave Watts 04/18/12 10:46 A http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSB7BEC0B4-8096-498d-8F9B-77C88878AC6C.htmlCameron Childress 04/18/12 10:47 A Thanks Dave,Eric Cobb 04/18/12 11:04 A I'm just starting to play around with CF 9's ORM some, and I love that I can have it automatically create tables for me. But one thing I have haven't been able to figure out yet is, is there a way to create indexes on tables via CF 9's ORM? I'm not talking about the indexes for primary keys or FK relationships to other tables. I'm wanting to create indexes on table columns not related to other tables. Is this doable in ORM, or am I just going to have to create the tables on the DB server to do it? Thanks, Eric Cobb http://www.cfgears.com ----- Excess quoted text cut - see Original Post for more ----- I'm sure it's doable in ORM, since it's just Hibernate, and you can certainly do this in Hibernate. I'm not sure where you'd do it, exactly, though - my guess would be in the mapping file that gets created for each CFC. But first, you might try just creating an "index" attribute for your CFPROPERTY tag and see what happens. http://stackoverflow.com/questions/3533301/creating-indexes-on-db-with-hibernate-index-annotation Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsi http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSB7BEC0B4-8096-498d-8F9B-77C88878AC6C.html index optional Specifies the name of an index that is created using the mapped column. ----- Excess quoted text cut - see Original Post for more ----- Thanks Dave, I tried to use the index attribute, but I can't seem to get it to do anything. Either ORM would create the table and ignore the index, or ORM just flat out wouldn't work. I wouldn't get an error, but it wouldn't create the table. I guess I'll go back and play with it some more and see if I can dig up more info on it. > I'm just starting to play around with CF 9's ORM some, and I love that I > can have it automatically create tables for me. But one thing I have > haven't been able to figure out yet is, is there a way to create indexes on > tables via CF 9's ORM? I'm not talking about the indexes for primary keys > or FK relationships to other tables. I'm wanting to create indexes on > table columns not related to other tables. > > Is this doable in ORM, or am I just going to have to create the tables on > the DB server to do it? I'm sure it's doable in ORM, since it's just Hibernate, and you can certainly do this in Hibernate. I'm not sure where you'd do it, exactly, though - my guess would be in the mapping file that gets created for each CFC. But first, you might try just creating an "index" attribute for your CFPROPERTY tag and see what happens. http://stackoverflow.com/questions/3533301/creating-indexes-on-db-with-hiber nate-index-annotation Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsi
|
May 23, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||