Saravana Perumal Shanmugam's blog

Using variable field names when running modifier operations on an embedded object in mongodb

When running modifier operations on an embedded object you would often run into situations where in the field name needs to be generated/referenced dynamically when the query runs.

Lets take an example, assume we have a db testing and in that we have a collection testing, in that lets insert some documents like

db.testing.save({key:1,data:{0:1,1:2,2:3}})

using the following commands

Portable Maatkit

If you have been using MySQL you must have used Maatkit.

Use php with cygwin ?

If you noticed cygwin, does not come with ports for php. Not a problem Cygwin Ports has a bunch of ports including php.

Access MySQL from another machine on Ubuntu

I you install MySql on Ubuntu, you might have faced issues connecting to the MySql server from another machine.

svn over https client certificate issue

Was checking out our code on ubuntu(jaunty) this weekend and was unable to checkout the code from our svn server. The checkout command kept asking me for the client certificate file.

cygwin unable to remap dll to same address as parent,

  • when you are working with Cygwin, sometimes you would get an error like this
  • "unable to remap some.dll to same address as parent
    someapp 4292 fork: child 3964 - died waiting for dll loading, errno 11"
  • then you would need to run rebaseall.
  • In order to run it, close all you Cygwin windows
  • Open a command prompt and go to your cygwin directory

Configure the premitive value of a map in a pojo

If you are working with Maps in a Pojo and if you are using a primitive datatype as the map's values. You can configure it using the @Column definition itself. Is in't that wierd :-)
    @CollectionOfElements
    @org.hibernate.annotations.MapKey(columns = @Column(name = "keyName") })
    @Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
    @JoinTable(name = "map_table", joinColumns = @JoinColumn(name = "key_name_id"))
    @Column(length = 1024)
    public Map<KeyObject, String> getMapObjects() {
        return mapObject;
    }

Trailit - Updated

Updated TrailIt with the new node migration code, lets see how this one performs.

Who's online

There are currently 0 users and 5 guests online.

Who's new

  • Saravana Peruma...

Syndicate content