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. 

----------------------------------------

From: "Dave Watts" <[email protected]>
Sent: Wednesday, April 18, 2012 9:46 AM
To: "cf-talk" <[email protected]>
Subject: Re: Creating Indexes with ORM

> 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



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350777
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to