Hello,

I'm trying OpenJPA 3.0.0 so I can use the AttributeConverter annotation.

But I'm having problems.  My converter is simple:

import javax.persistence.AttributeConverter;
import javax.persistence.Converter;

@Converter(autoApply = true)
public class StringInternConverter implements AttributeConverter<String, 
String>
{
     @Override
     public String convertToDatabaseColumn(String attribute)
     {
         return attribute;
     }

     @Override
     public String convertToEntityAttribute(String dbData)
     {
         return dbData != null ? dbData.intern(): null;
     }
}

The problem is that I can't get JPA to see this converter.  When I add 
it to persistence.xml like this:

     <!-- Converters -->
<class>com.be.db.jpa.StringInternConverter</class>

The enhancer complains that it StringInternConverter "does not have 
persistence metadata".

Is there a trick to get this to work?

Thanks,

Rob


-- 
Rob Scala
Buyers Edge, Inc.
351 North Frontage Road, Suite A210
New London, CT 06320
Phone: (860) 865-2127

Reply via email to