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;
    }

Who's online

There are currently 0 users and 2 guests online.

Who's new

  • Saravana Peruma...