Hibernate Spatial + Radii searches

57 views
Skip to first unread message

David Buhler

unread,
Oct 16, 2009, 12:36:14 AM10/16/09
to cf-orm-dev
Does the CF implementation of Hibernate support HibernateSpatial?

If not, how are people using HQL to perform a Zip Code Radius Search?

Thanks,
David

Shannon Hicks

unread,
Oct 16, 2009, 12:53:19 AM10/16/09
to cf-orm-dev
I have no clue about the first half of your question, but I am using
ORM with external services...

I end up looping over an array or whatnot, and using entityLoad() to
get the object....

<cfquery name="findbyzip">do the zip code SQL search here</cfquery>

<cfloop query="findbyzip">
<cfset thisStore = entityLoad("store",storeID,true)/>
</cfloop>

David Buhler

unread,
Oct 16, 2009, 1:30:02 AM10/16/09
to cf-orm-dev
http://www.hibernatespatial.org/

BTW: See you on Saturday, Shannon ;)

Shannon Hicks

unread,
Oct 16, 2009, 1:38:59 AM10/16/09
to cf-orm-dev
Interesting. The question in general is how do we use Hibernate add-
ons with CF9?

You should blog about it before Saturday :P

Shan

John Whish

unread,
Oct 16, 2009, 3:58:53 AM10/16/09
to cf-or...@googlegroups.com
Whilst we are talking about extensions, has anyone looked at using the
hibernate validator?
http://docs.jboss.org/hibernate/stable/validator/reference/en/html/

Bob Silverberg

unread,
Oct 16, 2009, 7:27:05 AM10/16/09
to cf-or...@googlegroups.com
Whilst we are talking about validations, I should mention that ValidateThis, my validation framework for ColdFusion objects, works perfectly with CF9 ORM-based objects.  I've not read all of the docs for the Hibernate validator, but from what I have read, ValidateThis provides most of its functionality, and even some extra stuff that is specific to developing HTML-based CF aplications.

One of the things that VT does not currently provide is for defining validation rules via annotations.  Currently you must either provide them in an XML file, or programmatically via CFML.  I do plan to add the ability to define validations using annotations in the very near future, as well as some other features of Hibernate validator, such as cascading validation.

Regarding using the Hibernate validator with CF ORM, again, this is just based on a cursory look at the docs, but it looks like the validation rules are baked into the java class itself, so that might be one technical hurdle.  Also, the results returned when validating are all java objects, so I imagine, if it is possible, that it would involve writing a bunch of Java code. One would have to wonder, if that is the case, whether there would be any point in trying to use it with CF ORM, or whether it would make more sense to simply write your whole domain model in Java or Groovy with Hibernate.

Oh, and for anyone interested, ValidateThis can be found at validatethis.riaforge.org.

Cheers,
Bob

Phillip Senn

unread,
Oct 19, 2009, 7:06:57 PM10/19/09
to cf-orm-dev
Whenever someone mentions zipcodes, I feel obligated to share with
them a file
that I've been carrying around for years now:
http://www.PhillipSenn.com/Index/Data/ZipCodes.txt

It's getting pretty old...
Is there a standard place to get this data now?

Rob Kolosky

unread,
Oct 19, 2009, 7:16:14 PM10/19/09
to cf-or...@googlegroups.com
On Mon, Oct 19, 2009 at 7:06 PM, Phillip Senn <phill...@gmail.com> wrote:
>
> Whenever someone mentions zipcodes, I feel obligated to share with
> them a file
> that I've been carrying around for years now:
> http://www.PhillipSenn.com/Index/Data/ZipCodes.txt
>
> It's getting pretty old...
> Is there a standard place to get this data now?

There's the Zip Code Database project on SourceForge

http://sourceforge.net/projects/zips/

The other one I found on Popular Data appears to be the same one you posted.

http://www.populardata.com/zipcode_database.html

--
Rob

Shannon Hicks

unread,
Oct 19, 2009, 7:20:03 PM10/19/09
to cf-orm-dev
So, according to Adobe (thanks CFinNC conference), in theory we can
just drop in Hibernate add ons and they should work. Granted, there
won't be the easy-as-pie methods to use like entityLoad() et al, but
it "should work"

Now, who's got time to play around with it to save the rest of us the
time & effort :D

Shan
Reply all
Reply to author
Forward
0 new messages