8/30/2012

Removing duplicates from the table

SELECT DISTINCT a.*
  FROM dbo.AssetDealsConnections a
  JOIN dbo.AssetDealsConnections b
  ON a._fk_Asset = b._fk_Asset AND a._fk_stageID = b._fk_stageID AND a._pk != b._pk
  ORDER BY a._fk_Asset, a._pk;


 DELETE b
  FROM dbo.AssetDealsConnections a
  JOIN dbo.AssetDealsConnections b
  ON a._fk_Asset = b._fk_Asset AND a._fk_stageID = b._fk_stageID AND a._pk > b._pk;

8/06/2012

Using Spring @Configurable and @Autowire to inject DAOs into domain objects

http://sujitpal.blogspot.com/2007/03/accessing-spring-beans-from-legacy-code.html

http://stackoverflow.com/questions/4703206/spring-autowiring-using-configurable