gorm and interface projections

9 views
Skip to first unread message

José Vilmar Estácio de Souza

unread,
Apr 9, 2018, 7:53:26 AM4/9/18
to Grails Dev Discuss

Hi all.


Interface Projections in gorm data service is a nice feature but I need a clarification regarding the query generated to extract the data to be exposed.


If I have an interface projection like the following:


interface authorInfo {

String getName()

}


Unless I am doing something wrong, the query created to retrieve the information represented by AuthorInfo retrieve all fields of the table.


Hibernate: select this_.id as id1_0_0_, this_.version as version2_0_0_, this_.name as name3_0_0_, this_.date_of_birth as date_of_4_0_0_ from author this_ where this_.name=? limit ?


Thanks.





--
José Vilmar, Telefones: 21 2555-2650 e 21 98868-0859,
        Skype: jvilmar
Reply all
Reply to author
Forward
0 new messages