That was great! I didn't know that spring could fetch entity properties in a DTO projection based on parameter names on the constructor! I always coded the constructor expression in the query...
@andromadusnaruto1544
4 жыл бұрын
Good day, @Thorben. I've been subscribed to your mailing list for a while and I've enjoyed your awesome content, especially with regards to Java Hibernate framework. My first time being on the channel. I wish you the best. I have committed to learning Spring framework + Hibernate framework by the end of this year or early next year. I have good practical knowledge of Java and OOP design principles.
@ronaldcastaneda2547
3 жыл бұрын
You are the best, thanks for the information.
@davidfelipegarciasegura8863
3 жыл бұрын
Great tutorial, thanks.
@cinemaismywife
3 жыл бұрын
Great tutorial, Please tell me how to fetch child data by a certain field from parent using spring projections. Thanks. Subscribed!
@chiths
3 жыл бұрын
Good video .. can u please do a lesson based on using Criteria Builder with associations (joins)
@anjanx44
Жыл бұрын
Great content, but how to use class dto for store procedure?
@mukhirais6557
2 жыл бұрын
How to pass associate object in constructor in JPQL query. Just u have shown only passing properties not obj.
@gurugovindgarg3771
3 жыл бұрын
Great tutorial, How can we populate interface projection from Json file for testing
@vinaykaushikinvisble
4 жыл бұрын
Is projection can me mixed with specification?
@cinemaismywife
3 жыл бұрын
Please tell me how to fetch child data by a certain field from parent using spring projections.
@khairnarshekhar
4 жыл бұрын
I'm using Interface projtion and one of the get method in interface of type OffsetDateaTime but it's giving error.. could you please shade some light on the issu
@ebichu8126
4 жыл бұрын
Hey Thorben, Thanks for your great video. I see many people are using JDBC template for fetching DTO because it is highly customizable. But I think JDBC template is easily messed up, and error-prone, and it is not readable when the query takes dynamic WHERE conditions. Could you let us know there is any benefit to use JDBC template against Spring Projection when it comes to outbound DTO projection? Thanks!
@kennyng9684
3 жыл бұрын
Good day @Thorben, i have a use case which i'm trying to glue graphql with jpa. The problem is queries from graphql are dynamic. They are then converted to JPA CriteriaQuery to generate projections and predicates to construct SQL. I need to map my resultset back to the JPA entity. I have tried AliasToBeanResultTransformer to auto-map my projections. I'm using hibernate beneath it. Unfortunately, I realised JPA CriteriaQuery converted to HQL is not producing aliases in the projection although I have configured aliases. This result in AliasToBeanResultTransformer not able to map the resultset back to the entity attributes. Do you have any reccomendation?
@jayashreeerrabelli4258
3 жыл бұрын
How did you resolve this ? It is expecting a constructor for every combination of attributes in select and groupby clauses, I have configured aliases too but nothing seems to work
@kennyng9684
3 жыл бұрын
@@jayashreeerrabelli4258 yes, in the end, i did a walkaround and rewrite the jpql to create the alias myself
@Quester82
2 жыл бұрын
When you need a class based DTO projection you can't use nested fields. There is no support for this out of the box. If you want to get unmanaged entity with nested fields like Collection you'll have to resort to using tools like Mapstruct. That was a real downside for me. Manageable but a downside non the less.
Пікірлер: 17