Home hibernate DTO with a deviant database
Reply: 0

hibernate DTO with a deviant database

user974 Published in July 16, 2018, 6:30 am

I am building a spring boot application which uses REST services to deliver content to the front-end

But my DTO does not correspond to my database. Here is a diagram of the database And my DTO should look something like this

public class GlobeEntity extends BaseEntity {
//  for all definition years
    private List<Instance> instances;
    class Instance {
//      CountryInstance.definitionYear
        private String definitionYear;
//      for all countries
        private List<Country> countries;
        class Country {
//          Country.countryId
            String id;
//          Country.externalIdentifier
            String externalIdentifier;
//          CountryInstanceCompatibility.total
            String com;
//          CountryInstanceUtility.total
            String uti;

Is this possible to do with hibernate annotations?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.320147 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO