Please use the google group to ask questions - thanks.

by akaIDIOT 08 Apr 13:10
Parametrized type in super class generates error during mapping

Playing around with Ebean as a possible replacement for the over-engineered and (around here at least) hated Hibernate, I came across a mapping I can't get to work in Ebean.

Below is a simplified version of the model I'm trying to get into a database (hoping this will list code readable manner):

public abstract class AbstractModel {

private List list;

public List getList() {
return list;

public void setList(List list) {
this.list = list;


public class ModelImpl extends AbstractModel {

public ModelImpl() {



The ModelImpl is the class I'd like to map to the database, and Ebean searches the parent class' fields, coming across list property. When checking the parametrized type for the List, a runtime exception is thrown stating type T cannot be resolved. As AbstractModel is the class being mapped, one would expect the T to be resolved to String and map a list of strings to the database.

How can I map the classes above to a database using Ebean? Is there a simple trick to get this to work, is this a bug in Ebean or do I need to remove the abstract super class from the picture and map the actual string list?

08 Apr 13:21
by akaIDIOT

For clarification: AbstractModel, List and List have parameters <T>, the extension of AbstractModel has parameter <String>.

(and your forum handles input in a dangerous manner...)

Create a New Topic

Introduction User Guide (pdf) Install/Configure Public JavaDoc Whitepapers
General Database Specific Byte Code Deployment Annotations Features
Top Bugs Top Enhancements