Skip to content

Instantly share code, notes, and snippets.

@sebersole
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save sebersole/9695745 to your computer and use it in GitHub Desktop.

Select an option

Save sebersole/9695745 to your computer and use it in GitHub Desktop.
Entity/MappedSuperclass - alternative
class EntityTypeMetadata extends IdentifiableTypeMetadata {
private MappedSuperclassTypeMetadata mappedSuperclass;
private EntityTypeMetadata superType;
...
}
@MapedSuperclass
class Nothing {
}
@Entity
class Something extends Nothing {
@Id Integer id;
...
}
@MappedSuperclass
class BasePersistentThing {
@Id Integer id;
...
}
@Entity
class AnEntity extends BasePersistentThing {
}
class MappedSuperclassTypeMetadata extends IdentifiableTypeMetadata {
private MappedSuperclassTypeMetadata superType;
....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment