/*
 * Copyright 2016 Studentmediene i Trondheim AS
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package no.dusken.momus.mapper;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.datatype.hibernate4.Hibernate4Module;

/**
 * An ObjectMapper that registers a HibernateModule, so a JSON serialization
 * doesn't fail with Hibernate lazy-loading.
 */
public class HibernateAwareObjectMapper extends ObjectMapper {

    public HibernateAwareObjectMapper() {
        // converts lastName to last_name and the other way
        setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
        registerModule(new Hibernate4Module());
    }
}

@@ -639,16 +639,52 @@
 apper;%0A%0A
+import java.text.SimpleDateFormat;%0A%0A
 import c
@@ -836,17 +836,17 @@
 ibernate
-4
+5
 .Hiberna
@@ -843,25 +843,25 @@
 e5.Hibernate
-4
+5
 Module;%0A%0A/**
@@ -1254,16 +1254,85 @@
 CORES);%0A
+        setDateFormat(new SimpleDateFormat(%22yyyy-MM-dd HH:mm a z%22));%0A
         
@@ -1363,9 +1363,9 @@
 nate
-4
+5
 Modu

Fix object mapper after update