O'Reilly logo

Spring Roo 1.1 Cookbook by Ashish Sarin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a mapped superclass

In this recipe, we'll look at how to create an entity which inherits a mapped superclass. The fields of a mapped superclass are stored into the table to which the inheriting entity is mapped. The mapped superclass itself is not mapped to any table. In this recipe, we'll create the Flight entity, which extends the AuditFields class. The AuditFields class represents a mapped superclass; the fields of AuditFields are stored into the table to which the Flight entity is mapped.

The following figure shows the relationship between the Flight entity and the AuditFields mapped superclass:

Creating a mapped superclass

Getting ready

Exit the Roo shell and delete ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required