House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Creating Indexes with ORM

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Eric Cobb
04/18/2012 10:30 AM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
04/18/2012 10:46 AM

----- 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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Eric Cobb
04/18/2012 11:04 AM

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


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 23, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference