I’ve been working on a Spring Roo application and needed to add a domain class used to model application users. I tried using the default Roo command for adding the User domain class “entity jpa –class ~.domain.User –testAutomatically”, but Roo does not like that method because the name “User” is a reserved word in SQL. However, you can overwrite the command and force Roo to create a User class by adding –permitReservedWords to the command (entity jpa –class ~.domain.User –permitReservedWords –testAutomatically). I’m not sure if this is the most secure way to do things, but it is an option.
Today I was working on a function to convert a map coordinate from degrees-minutes-second format (e.g., 125° 23′ 42” W) to decimal degrees (e.g., -125.395) and I came across the word Sexagesimal. It is not profanity.
I do quite a bit of work with the Python based Django framework. Django is a flexible framework that leverages the Python programming language. A typical development scenario for development using Django involves writing models and/or views then running unit tests to see if these changes break the application. If you create test data for the unit tests using Django’s fixtures then you might have used Django’s “manage.py dumpdata” to export test and development data to one of your application’s fixtures. If you have used the dumpdata command then you may be experience an error message when running the unit tests that indicates a primary key error when loading “contenttypes”. The unit tests will run, but this warning can be troublesome. There is a simple solution. When using dumpdata specify the “-e contenttypes” switch to exclude the “contenttypes” model. I also suggest specifying “-e contenttypes -e auth”. This should eliminate the primary key error or warning message when you run the unit test.
Over the last few months I’ve been volunteering some of my time to develop web services that deliver geospatial data for eco-systems. My eco-system web services help support the AFS Standard Methods for Sampling North American Fishes website. The initial version of the eco-services site can be found here. Right now the eco-services site only provides level 1 eco-region data as described here. The eco-service is accessed through a REST and JSONP call. Future enhancements are on the horizon.
I’ve been working on a Grails 2.0 app that uses PostgreSQL as the back-end db. One of the tables I have been designing is a Users table, which I named “user”. PostgreSQL doesn’t seem to like “User” as a table name, at least not in the context of the Grails/Hibernate sql generation tools. Consequently, in the domain model for the User class I had to set the table name to something other than “user”. In the model’s Groovy class I set the following: