title: Annotation for mapping Joda Time "Period" in JPA using Eclipse Link
body: <p>I am having a field - <code>expiryLimit</code> in my <code>Item</code> entity for which I thought of using <em>joda-time</em> <code>Period</code> which would be an appropriate type to use here. </p>
  
  <p>Just to explain - <code>expiryLimit</code> is the number of <em>year</em>, <em>month</em>, <em>days</em>, or any duration after which a particular <em>item</em> will expire and using which I can calculate the exact <code>expiryDate</code> of an <code>Item</code> given a <code>deliveryDate</code>. </p>
  
  <p>Now the problem I'm facing is finding an appropriate way to map this type into <code>JPA</code>.</p>
  
  <p>Is there any available <em>API</em> or <em>3rd party library</em> which provides some annotation to do that? Also I've used the <em>Eclipse Link</em> <code>@Converter</code> annotation to map <code>DateTime</code> with <em>MySQL</em> <code>TimeStamp</code>. So, would I need to do the same thing with <code>Period</code> also. And if yes, then to what type should I convert it. To <code>varchar</code>? or to <code>Long</code>? or some other type appropriate to represent a <code>Period</code>.</p>