Tag Archives: data model

A curated list of awesome big data frameworks, ressources and other awesomeness.


A curated list of awesome big data frameworks, resources and other awesomeness. Inspired byawesome-php, awesome-python, awesome-ruby, hadoopecosystemtable & big-data. Click to Read>>

Your contributions are always welcome!

JPA Tutorial: Mapping Entities – Part 2


JPA Tutorial: Mapping Entities – Part 2

In my last post I showed a simple way of persisting an entity. I explained the default approach that JPA uses to determine the default table for an entity. Let’s assume that we want to override this default name. We may like to do so because the data model has been designed and fixed before and the table names do not match with our class names (I have seen people to create tables with “tbl_” prefix, for example). So how should we override the default table names to match the existing data model?

Turns out, it’s pretty simple. If we need to override the default table names assumed by JPA, then there are a couple of ways to do it –