Thursday, March 24, 2011

manually set id of grails domain object

Problem:
if you create a new domain object and set its id in the constructor like this:
Cat catman = new Cat(id:1000, name: "catman", kind: "domestic short haired")
later, if you look at the object the id will be null. what gives?!


Solution:
Its madness, but it works to assign the id after the object is made. Just add
catman.setId(1000);
and you are in business.

Note: if you want to save the object into db after doing this, you must set the id generator to 'assigned'

Sunday, March 13, 2011

lg cdma usb modem driver

The lg mobile phone driver is hard to find. i am using it to make bitpim work with my phone.

It will work with all LG VX-something phones and also is sometimes called this:

Prolific USB-to-Serial Comm Port Driver
LGE CDMA Composite USB Device Driver
LGE CDMA USB Modem Driver
LGE CDMA USB Modem Diagnostic Serial Port Driver
LGE CDMA USB Modem (VCOMM) Driver
LGE CDMA USB Modem Diagnostic Serial Port (VCOMM) Driver
LGE CDMA USB Serial Port Driver


get it here:
http://programmingdrunk.com/random-stuff/LGUSBModemDriver_4.6_WHQL.zip