Skip to content

Instantly share code, notes, and snippets.

@deftdawg
Created August 26, 2013 19:13
Show Gist options
  • Save deftdawg/6345364 to your computer and use it in GitHub Desktop.
Save deftdawg/6345364 to your computer and use it in GitHub Desktop.
Format change to include time
diff --git a/src/main/java/com/rcaloras/roo/addon/timestamp/TimestampMetadata.java b/src/main/java/com/rcaloras/roo/addon/timestamp/TimestampMetadata.java
index d0f5e40..6ea0367 100644
--- a/src/main/java/com/rcaloras/roo/addon/timestamp/TimestampMetadata.java
+++ b/src/main/java/com/rcaloras/roo/addon/timestamp/TimestampMetadata.java
@@ -85,7 +85,8 @@ public class TimestampMetadata extends AbstractItdTypeDetailsProvidingMetadataIt
List<AnnotationMetadataBuilder> list = new ArrayList<AnnotationMetadataBuilder>();
AnnotationMetadataBuilder dateTimeFormat=new AnnotationMetadataBuilder(new JavaType("org.springframework.format.annotation.DateTimeFormat"));
- dateTimeFormat.addStringAttribute("style", "M-");
+// dateTimeFormat.addStringAttribute("style", "M-");
+ dateTimeFormat.addStringAttribute("pattern", "yyyy-MM-dd HH:mm:ss");
AnnotationMetadataBuilder temporal=new AnnotationMetadataBuilder(new JavaType("javax.persistence.Temporal"));
temporal.addEnumAttribute("value", "javax.persistence.TemporalType", "TIMESTAMP");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment