{"action":"created","issue":{"url":"https://api.github.com/repos/payara/Payara/issues/2807","repository_url":"https://api.github.com/repos/payara/Payara","labels_url":"https://api.github.com/repos/payara/Payara/issues/2807/labels{/name}","comments_url":"https://api.github.com/repos/payara/Payara/issues/2807/comments","events_url":"https://api.github.com/repos/payara/Payara/issues/2807/events","html_url":"https://github.com/payara/Payara/issues/2807","id":328327652,"node_id":"MDU6SXNzdWUzMjgzMjc2NTI=","number":2807,"title":"LocalDate and LocalDateTime fields are not mapped to correct database types","user":{"login":"vanuatoo","id":6188902,"node_id":"MDQ6VXNlcjYxODg5MDI=","avatar_url":"https://avatars0.githubusercontent.com/u/6188902?v=4","gravatar_id":"","url":"https://api.github.com/users/vanuatoo","html_url":"https://github.com/vanuatoo","followers_url":"https://api.github.com/users/vanuatoo/followers","following_url":"https://api.github.com/users/vanuatoo/following{/other_user}","gists_url":"https://api.github.com/users/vanuatoo/gists{/gist_id}","starred_url":"https://api.github.com/users/vanuatoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanuatoo/subscriptions","organizations_url":"https://api.github.com/users/vanuatoo/orgs","repos_url":"https://api.github.com/users/vanuatoo/repos","events_url":"https://api.github.com/users/vanuatoo/events{/privacy}","received_events_url":"https://api.github.com/users/vanuatoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-31T23:10:34Z","updated_at":"2018-06-01T07:09:27Z","closed_at":null,"author_association":"NONE","body":"Using Payara 5.181 with PostgreSQL 9.5\r\nMy Entities define fields with types LocalDate and  LocalDateTime which should be supported out of the box. For Java EE 7 I use AttributeConverter.\r\n\r\nIt's expected that when table is generated corresponding fields will have timestamp without time zone types in the table\r\n\r\nInstead table columns are generated with varchar types.\r\nThere is a line in the log\r\nConfig:   The default table generator could not locate or convert a java type (class java.time.LocalDate) into a database type for database field (<tablename>.<fieldname>). The generator uses \"java.lang.String\" as default java type for the field.\r\n\r\nIf I change table column type manually afterwards data conversion back and fourth is working except one case.\r\n\r\nWhen the field type is LocalDateTime and the value is null, exception is thrown when persisting the Entity\r\n\r\nCaused by: org.postgresql.util.PSQLException: ERROR: column \"<column_name>\" is of type timestamp without time zone but expression is of type character varying\r\n  Hint: You will need to rewrite or cast the expression. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/payara/Payara/issues/comments/393785164","html_url":"https://github.com/payara/Payara/issues/2807#issuecomment-393785164","issue_url":"https://api.github.com/repos/payara/Payara/issues/2807","id":393785164,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzc4NTE2NA==","user":{"login":"dmatej","id":302904,"node_id":"MDQ6VXNlcjMwMjkwNA==","avatar_url":"https://avatars2.githubusercontent.com/u/302904?v=4","gravatar_id":"","url":"https://api.github.com/users/dmatej","html_url":"https://github.com/dmatej","followers_url":"https://api.github.com/users/dmatej/followers","following_url":"https://api.github.com/users/dmatej/following{/other_user}","gists_url":"https://api.github.com/users/dmatej/gists{/gist_id}","starred_url":"https://api.github.com/users/dmatej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmatej/subscriptions","organizations_url":"https://api.github.com/users/dmatej/orgs","repos_url":"https://api.github.com/users/dmatej/repos","events_url":"https://api.github.com/users/dmatej/events{/privacy}","received_events_url":"https://api.github.com/users/dmatej/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T07:09:27Z","updated_at":"2018-06-01T07:09:27Z","author_association":"CONTRIBUTOR","body":"No problem with EclipseLink and MySql, it might be problem with platform support ...?\r\nhttps://www.eclipse.org/eclipselink/documentation/2.6/concepts/app_tl_ext001.htm\r\nI use this without any problem:\r\n```\r\n@Table(name = \"ImportBatch\")\r\n@Entity\r\npublic class ImportBatch implements Serializable {\r\n  private static final long serialVersionUID = 1L;\r\n  @Id\r\n  @GeneratedValue(strategy = GenerationType.IDENTITY)\r\n  private Integer id;\r\n  private Integer idSenderUnit;\r\n  private LocalDateTime timestamp;\r\n...\r\n```"}}
{"actor":{"display_login":"dmatej"}}