Monthly Archives: February 2010

Hitler and Cloud Computing woes

One more reason why Hitler failed. Its just too funny especially when he wants to update his facebook page.

Enjoy it.

Here is the original video.

Don’t use Default attribute on CF9 ORM persistant object primary key instead use unSavedvalue

I recently started using the CF9 along with Hibernate ORM and I had trouble saving the the object using the EntitySave Method on a new object with out setting the ForceInsert param to true.

If I don’t set the forceInsert param to true then I would get the below error which was driving me nuts since I wanted to use the EntitySave method and let CF ORM decide to save/update the object.


Exception in Hibernate operation.
Either the updated/deleted row does not exist or the session contained stale data. Root cause :o rg.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

After a lot of time googling and going through my logs I figured out that doing the following would let me use the EntitySave as I wanted.

  1. Adding the Unsavedvalue attribute to the primary key and setting it to my default ID before the object is persisted.
  2. Removing the default attribute also works.

Looks like CF9 internally uses the primary key of the object to determine if the object is persisted or not. But setting the default attribute makes the CF engine to set the value when the object is created.

I was used to setting the default attribute on my properties by practice and even the CFBuilder didn’t highlight this as an invalid attribute on the primary key which all led me to waste almost a day on this silly issue.

Hopefully this would help some one starting  off  with CF9 ORM.

Amazon S3 isn’t for everyone

Its always been a pain to maintain a  backup of all photos and personal documents.When I heard about Amazon S3 cloud storage with its cheap pricing structure, I was in heaven finally a place I can store my data for eternity for cheap.

But when I started to move my data to Amazon S3 , the reality struck me hard was that

  1. my so called broadband connection which boasts a 512kbps upstream took me more than an hour to push a 200MB file and I have about 10gb of data.
  2. Most of all I can’t even switch to FIOS internet (Verizon) which has better up stream because they don’t have coverage in my locality.
  3. None of the freeware S3 sync applications like S3Fox, cloudberry and S3 Explorer support bandwidth limiting capability on up stream. So they basically occupy the pipeline until the upload is done annoying my room mate who was  trying to figure what the hell’s happening with the connection for like 2 days.

So until I get a better internet connection or smart app that can push data like torrents clients, I will not be able to use Amazon S3 as my primary back up storage.

Amazon S3 back up or file storage isn’t for people who are stuck in the cable world like me.

Switch to our mobile site