[
https://issues.apache.org/jira/browse/OPENJPA-2411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Fenderbosch updated OPENJPA-2411:
--------------------------------------
Attachment: openjpa.patch
> Support Postgres casts for non-standard types such as inet, cidr, macaddr,
> etc.
> -------------------------------------------------------------------------------
>
> Key: OPENJPA-2411
> URL: https://issues.apache.org/jira/browse/OPENJPA-2411
> Project: OpenJPA
> Issue Type: Improvement
> Components: jdbc
> Affects Versions: 2.2.2
> Environment: postgres 9.0
> Reporter: Eric Fenderbosch
> Labels: postgres
> Attachments: openjpa.patch
>
>
> For non-standard types (inet, cidr, macaddr) you can cast to a known Postgres
> type with a double colon and the type.
> Example:
> insert into click (ip) values ('127.0.0.1'::inet)
> When creating a prepared statement the placeholder marker should be '?::'
> instead of '?'.
> This can be fixed by overriding DBDictionary.getMarkerForInsertUpdate (patch
> attached) and annotating the field with the non-standard type. Like this:
> @Column(columnDefinition = "inet")
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira