if(ICdmBase.class.isAssignableFrom(entityClazz)) {\r
ICdmBase cdmBase = (ICdmBase)entity;\r
if(cdmBase.getId() == 0) {\r
- cdmBase.setCreated(new DateTime());\r
- Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\r
+ if (cdmBase.getCreated() == null){\r
+ cdmBase.setCreated(new DateTime());\r
+ }\r
+ Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\r
if(authentication != null && authentication.getPrincipal() != null && authentication.getPrincipal() instanceof User) {\r
User user = (User)authentication.getPrincipal();\r
cdmBase.setCreatedBy(user);\r