On Fri, Oct 23, 2009 at 10:54 AM, ljnelson [via OpenJPA] <
[email protected]<ml-node%[email protected]>
> wrote:

> On Fri, Oct 23, 2009 at 10:32 AM, ljnelson [via OpenJPA] <[hidden 
> email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3879205&i=0>
> > wrote:
>
>> Where in the customize(ClassMapping) method of ReverseCustomizer would I
>> set
>> something that would let the code generators downstream know that they
>> should generate mapped superclasses instead of entities?
>>
>
> Looks like
> http://openjpa.apache.org/builds/latest/docs/javadoc/org/apache/openjpa/meta/ClassMetaData.html#setEmbeddedOnly%28boolean%29does
>  the trick.
>

I spoke too soon.  Setting this to true seems to eliminate all the useful
length and nullability information from the resulting annotations.

So although instead of:

@Entity
@Table(name = "foo")
public class Foo ... {
  @Basic
  @Column(nullable = false, length = 4)
  private String bar;

}

I get

@MappedSuperclass
@Table
public class Foo ... {
  @Basic
  private String bar;

}

I guess I'll keep looking.

Laird

-- 
View this message in context: 
http://n2.nabble.com/ReverseMappingTool-easiest-way-to-produce-MappedSuperclasses-tp3879078p3879262.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to