JPA property java.net.URL
问题 HI, I have an object which has a piece of URL-Information associated with it. Currently I save this URL in a simple String property, but java.net.URL would provide me with additional goodies such as detection of malformed URLs etc. On the other hand I would consider it very ugly, if JPA simply created a LOB for the URL-Object. Does anyone know how a property of the type java.net.URL will be persisted to the database by compliant JPA providers? 回答1: As per the JPA spec: The persistent fields or