Thorben Janssen
Thorben Janssen
  • Видео 301
  • Просмотров 2 320 722
Promo Expert Session Ronald Dehuysser JobRunr
Watch Ronald's entire Expert Session on JobRunr and get access to video courses, monthly Java Persistence News, other Expert Sessions, and more:
thorben-janssen.com/join-persistence-hub/
This is a small part of the Expert Session we will host on July 15th. Ronald will join us as a guest speaker to talk about batch jobs and how to implement them using JobRunr
Members of the Persistence Hub can find the recording of the entire session in the archives. Go to persistence-hub.com and become a member to get access to all my video courses, monthly Expert Sessions with amazing guest speakers, monthly Java Persistence News and a monthly Coding Problem.
Connect with Ronald Dehuysser:
Twitter: @rdehuyss
W...
Просмотров: 296

Видео

Databases and AI with Neo4J as an example with Michael Simons
Просмотров 347Месяц назад
Watch Michael's entire Expert Session on AI and Neo4J and get access to video courses, monthly Java Persistence News, other Expert Sessions, and more: thorben-janssen.com/join-persistence-hub/ This is a small part of the Expert Session we will host on June 19th. Michael will join us as a guest speaker to talk about AI, how to use RAG and other techniques to improve the results, problems with cu...
Current State of Maven 4 with Karl Heinz Marbaise
Просмотров 7232 месяца назад
Watch Karl Heinz's entire Expert Session on Maven 4 and get access to video courses, monthly Java Persistence News, other Expert Sessions, and more: thorben-janssen.com/join-persistence-hub/ This is a small part of the Expert Session we hosted this week. Karl Heinz joined us as a guest speaker to talk about the current state of Maven 4 and what you should do now with your Maven 3 builds. Member...
Persistence Hub Snippets: DDD meets JPA
Просмотров 2,3 тыс.Год назад
This is a small part of the Expert Session we hosted this week. Oliver Drotbohm joined us as a guest speaker to talk about how the concepts of Domain Driven Design and JPA can fit together. Members of the Persistence Hub can find the recording of the entire session in the archives. Go to persistence-hub.com and become a member to get access to all my video courses, monthly Expert Sessions with ...
Hibernate @NotFound - How to handle broken foreign key reference
Просмотров 4,1 тыс.2 года назад
Some table models don’t enforce their foreign key references by a foreign key constraint. This is a bad practice that often leads to foreign key references that point to non-existing records. When Hibernate tries to resolve such a broken reference, it throws an EntityNotFoundException. You should, therefore, define a foreign key constraint for every foreign key reference. But after someone deci...
Choosing ListSematics in Hibernate 6
Просмотров 1 тыс.2 года назад
Based on its javadoc, a java.util.List is supposed to represent an ordered collection of values. But that’s not necessarily the case if you use it as the type of a to-many association or an ElementCollection. As I explained before, Hibernate can handle a java.util.List as a Bag or a List. Only the List mapping persists the order of its elements. But by default, Hibernate handles a java.util.Lis...
Incubating Features in Hibernate 6
Просмотров 2,4 тыс.2 года назад
If you tried Hibernate 6, you might have recognized the new @Incubating annotation. The Hibernate team introduces it to tell users about new APIs and interfaces that might still change. That’s a great addition because most developers expect new APIs and features to be stable after they are part of a final release. In general, that is the case. Hibernate’s APIs are incredibly stable. But not bei...
How to add Flyway to an existing project
Просмотров 3,7 тыс.2 года назад
After my talk about combining Flyway, Hibernate, and jOOQ at the JavaLand conference, one of the participants asked me how to add Flyway to an existing application that’s already deployed in production. This is a common question because database migrations get often ignored for new projects. And that’s understandable. You don’t need it for the first installation, and there are many more urgent ...
Improved mapping of ZonedDateTime and OffsetDateTime in Hibernate 6
Просмотров 1,6 тыс.2 года назад
Working with timestamps with timezone information has always been a struggle. Since Java 8 introduced the Date and Time API, the classes OffsetDateTime and ZonedDateTime have become the most obvious and commonly used types to model a timestamp with timezone information. And you might expect that choosing one of them should be the only thing you need to do. But unfortunately, that isn’t the case...
New MutationQuery and SelectionQuery interfaces in Hibernate 6
Просмотров 1,5 тыс.2 года назад
One of the smaller changes in Hibernate 6 that can easily get overlooked and which Steve Ebersole presented in a recent Expert Session in the Persistence Hub, is the introduction of the MutationQuery and SelectionQuery interfaces. It allows the separation between queries that change data and the ones that select it from the database. Older Hibernate versions and the JPA specification use the Qu...
How to call native SQL queries with JPA and Hibernate
Просмотров 4,3 тыс.2 года назад
JPQL is the most common way to query data from a database with JPA. It enables you to reuse your mapping definitions and is easier to use than SQL. But it supports only a small subset of the SQL standard, and it also provides no support for database-specific features. So what shall you do if you need to use a database-specific query feature or your DBA gives you a highly optimized query that yo...
Hibernate's Best Logging Configuration (2022 Edition)
Просмотров 1,9 тыс.2 года назад
Choosing the right logging configuration can make the difference between finding a performance issue during development or suffering from it on production. But it can also create an overhead that slows down your application. You need to decide which information you need and configure your system accordingly. I, therefore, prefer to use two different configurations: 1. The development configurat...
Hibernate 6 EmbeddableInstantiator - Instantiate embeddables your way
Просмотров 1,3 тыс.2 года назад
Embeddables are simple Java objects. They provide an easy way to define and group a set of attributes that become part of your entity. Developers often use them to create reusable mapping information and handle them using the same piece of business code. Unfortunately, the JPA specification and Hibernate until version 6.0.0, required your embeddable to have a default constructor. This might be ...
Spring Data JPA - How to Use Dynamic Inserts and Updates
Просмотров 9 тыс.2 года назад
When you persist a new entity or update an existing one with Spring Data JPA, you might have recognized that you’re always executing the same SQL statement that sets all columns mapped by the entity. That’s even the case if you only update one of its attributes. That is a performance optimization provided by Hibernate, the JPA implementation that Spring Data JPA uses by default. Hibernate tries...
FlushMode in JPA and Hibernate - What it is and how to change it
Просмотров 4,1 тыс.2 года назад
The FlushMode defines when new entities and your changes on existing ones get written to the database. This might seem like a simple and obvious mechanism. But I recognized in my Q&A calls that it often causes some confusion because, by default, Hibernate doesn’t perform a flush when you call the persist method on your EntityManager, or the save method on your Spring Data JPA repository. It als...
The Best Spring Data JPA Logging Configuration in Spring Boot
Просмотров 2,7 тыс.2 года назад
The Best Spring Data JPA Logging Configuration in Spring Boot
The Best Mapping for Shared Technical Attributes With Hibernate
Просмотров 1,6 тыс.2 года назад
The Best Mapping for Shared Technical Attributes With Hibernate
Mixing inheritance mappings
Просмотров 1,1 тыс.2 года назад
Mixing inheritance mappings
Spring Data JPA Implementing Bulk Updates
Просмотров 10 тыс.2 года назад
Spring Data JPA Implementing Bulk Updates
Spring Data JPA - Publishing Domain Events When Changing an Entity
Просмотров 4,1 тыс.2 года назад
Spring Data JPA - Publishing Domain Events When Changing an Entity
Fetching A DTO Projection with a To Many Association
Просмотров 7 тыс.2 года назад
Fetching A DTO Projection with a To Many Association
@DiscriminatorFormular - Modeling Single Table Inheritance Without a Discriminator
Просмотров 1,8 тыс.2 года назад
@DiscriminatorFormular - Modeling Single Table Inheritance Without a Discriminator
Modeling sequence-based composite primary keys with Hibernate
Просмотров 1,8 тыс.2 года назад
Modeling sequence-based composite primary keys with Hibernate
Spring Data JPA - Detecting Your Entity’s State
Просмотров 3,7 тыс.2 года назад
Spring Data JPA - Detecting Your Entity’s State
QueryDSL : How to use QueryDSL with Hibernate
Просмотров 10 тыс.2 года назад
QueryDSL : How to use QueryDSL with Hibernate
Spring Data JPA - Working with Views
Просмотров 12 тыс.2 года назад
Spring Data JPA - Working with Views
Hibernate: How to Generate Values of Basic Entity Attributes
Просмотров 1,5 тыс.2 года назад
Hibernate: How to Generate Values of Basic Entity Attributes
Panache: Repository Pattern
Просмотров 3,1 тыс.2 года назад
Panache: Repository Pattern
5 Hibernate Features You Should Use With Spring Data JPA
Просмотров 5 тыс.2 года назад
5 Hibernate Features You Should Use With Spring Data JPA
Panache : Active Record Pattern
Просмотров 3,1 тыс.2 года назад
Panache : Active Record Pattern

Комментарии

  • @cvgaviao
    @cvgaviao День назад

    Hi, what if I must insert data before start the app. for example, using Flyway, how to prevent a Id value collision?

  • @surbhigangrade9251
    @surbhigangrade9251 13 дней назад

    Very well explanation, could you please provide the link for Guide to JPQL Query?

  • @srikanthkadiyala5971
    @srikanthkadiyala5971 14 дней назад

    Good Morning, I have a scenario to fetch the data from teradata sql views by using spring-boot-data-jpa with no primary key column in database. 1. When using entity it is expecting primary key but we don't have the PK ID column in database. Existing behaviour of data mapping: They joined multiple views and getting the data and mapping DTO class by using RowMapper with spring-boot < 3.x Expected: After >3.x spring-boot version upgrade data binding is not happening. If you have any idea that would be great helpful to me?? Thanks Note:I have done the all the code change related to JPA but getting the Exception like ID column not found in database because as mentioned don't have Id column in views..

  • @osmancankaya4371
    @osmancankaya4371 15 дней назад

    Thank you Thorben. 👍

  • @nitinsoni3358
    @nitinsoni3358 17 дней назад

    Good work, thanks

  • @user-gk3ep5mq9r
    @user-gk3ep5mq9r 17 дней назад

    Boiler plate on tests

  • @kthun-v7c
    @kthun-v7c 26 дней назад

    0:00 Intro 1:42 JPQL Queries 4:18 Sorting 5:52 Paginating Query Results 6:49 SpEL Expressions for Entity Names & Advabced Like Expressions 8:24 Native Queries 9:53 Parameter Handling 12:13 Modifying Queries 13:00 Conclusion 14:25 Thoughts on Java Library

  • @paulhetherington3854
    @paulhetherington3854 29 дней назад

    Hiber -- nazi intelligence; -- i.e. beforehand - double minded -- they called, our iLAN-- Hilo!

  • @paulhetherington3854
    @paulhetherington3854 29 дней назад

    JN SEN -- ARRVN -- Oriental -- for: "Life of - our daughter!" He be, a terrorist then! J-- attched - or attacked - by: "exp of -- the order - of nazi!"

  • @ModifiedGaddiyan
    @ModifiedGaddiyan Месяц назад

    tell me when query gives you list of names then how to get that list?

  • @davincibaker
    @davincibaker Месяц назад

    WHAT ABOUT INSERTS ?

  • @christianweise8806
    @christianweise8806 Месяц назад

    Coole Beispiele. 👍

  • @fireh3211
    @fireh3211 Месяц назад

    How to migrate to previous versions?

  • @KiffenBeats
    @KiffenBeats Месяц назад

    This video is a pure gold. Thanks sir

  • @AnastasiaChoise
    @AnastasiaChoise Месяц назад

    Thank you sm for help!

  • @williamjwebb
    @williamjwebb 2 месяца назад

    Is there a measurable performance hit for the property-has-changed determination, and, if there is, is that hit offset by less downstream cost (slimmer i/o from the appsrvr to db, and obv. within the db)?

  • @prateekashtikar8631
    @prateekashtikar8631 2 месяца назад

    Could you please share link to your source code?

  • @sidof8065
    @sidof8065 2 месяца назад

    Thanks for the content ! how write jUnit test of class with enum properties. Like public interface HouseRepository extends PagingAndSortingRepository<House,Long> { Page<House> findByHouseTypeContaining(HouseType houseType, Pageable pageable); } @Entity(name = "house") public class House { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "house_sequence") @SequenceGenerator(name = "house_sequence",sequenceName = "house_sequence",allocationSize = 1) private Long id; @Enumerated(STRING) private HouseType houseType;

  • @ferlezcano
    @ferlezcano 2 месяца назад

    Nice to hear from you again, Thorben!

    • @ThoughtsOnJava
      @ThoughtsOnJava Месяц назад

      I'll be back soon with more videos. I promise!

  • @mobiletraderkpk
    @mobiletraderkpk 2 месяца назад

    Thanks for tip.

  • @gouthamreddy2252
    @gouthamreddy2252 2 месяца назад

    You said update method throws an exception but it didnt throw any exception in ur video

  • @sumitshahu8898
    @sumitshahu8898 2 месяца назад

    Any sample code to generate custom sequence, am using <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.2.5</version>

  • @Joseph-oz7tx
    @Joseph-oz7tx 2 месяца назад

    like always very nice video.

  • @user-vr9gp2qf9l
    @user-vr9gp2qf9l 3 месяца назад

    Suppose I have Existing Spring project and all db connections everything has been done there in application.properties , Now I want to use flyway for existing proeject in Production , Do we really need baselining for that also ? if yes then why : if no then how ?

  • @wilsonmwangi8647
    @wilsonmwangi8647 3 месяца назад

    Good content. Please could you React in your next video. Thanks

  • @Photoshopper2010
    @Photoshopper2010 3 месяца назад

    how to implement pagination? I can't find any info

  • @m.kalatchev
    @m.kalatchev 3 месяца назад

    You save me a lot of troubles. Thanks for sharing!

  • @erikgollot6331
    @erikgollot6331 3 месяца назад

    The problem is not huge graph and "complex" joins. You can join many relationships. The real problem is the cartesian product when you join multiple ToMany relationships. In you example, if an author write 10 books and theses books are published, each by 5 publishers, you will have 10×5 rows = 50 in the resultset returned by your DB. If you join 10 ToOne relationships, no problem. So we cannot talk about graphs without talking about cartesian product

  • @ravpod
    @ravpod 4 месяца назад

    There is one problem with this solution. While you are using for loop to remove all books CocurrencyModificationException occures.

  • @A3A3adamsan
    @A3A3adamsan 4 месяца назад

    I don't know if this is OOP's fault, or hibernate's, but this is ridiculous, overcomplicated bull$hit. All we need is getAndIncrement a sequence from the database, and perform an insert in a transaction. How are we supposed to remember this (which solution doesn't work since hibernate 6)?

  • @julianlagg6559
    @julianlagg6559 4 месяца назад

    Does slow-query-logging create noticeable overhead when queries are not slow and nothing gets logged? It seems useful to have it activated in prod, and when a request is slow because of a truly slow query than I don't care much if it gets a tiny additional slowdown from writing a log-message.

  • @engalibadouin5222
    @engalibadouin5222 4 месяца назад

    You Always awesome Thorben

  • @AMAR1010-fg7cm
    @AMAR1010-fg7cm 4 месяца назад

    what if we have multiple Dto classes and need to map query result to objects of dto

  • @mariaangelicavalderrama8163
    @mariaangelicavalderrama8163 4 месяца назад

    Thanks !!

  • @Lykkos29
    @Lykkos29 4 месяца назад

    it's okay to use merge when I want to update child entities?

  • @ambraambra7709
    @ambraambra7709 4 месяца назад

    Unfortunately, this didn't work for me. I have Offer (one-many) Items (many-one) StockInfo (many-one) Product. The last table (Product) doesn't get fetched... Don't know why. I had to use a Query with multiple JOIN FETCH.

  • @agarkovand
    @agarkovand 5 месяцев назад

    1:10 why do you call "private Book book" class variable an "Entity attribute"?

  • @simeonpopov4172
    @simeonpopov4172 5 месяцев назад

    Great content it was very helpful.

  • @IIIxwaveIII
    @IIIxwaveIII 5 месяцев назад

    on the outbox table slide, what is the use of aggrID where is already have an ID as the primary key? also, in the book service slide you show the outbox table without a aggrID field. is this on purpose?

  • @romakhimani
    @romakhimani 5 месяцев назад

    This is giving the below error : Recognizing native query as a function call is no longer supported

  • @Utub-qc2cz
    @Utub-qc2cz 6 месяцев назад

    Question: Is there anyway to access Join tables using criteria API ?

  • @ruixue6955
    @ruixue6955 6 месяцев назад

    3:31 5:52 @Transactional 6:06 propagation enum 6:22 REQUIRED - default 6:54 NOT_SUPPORTED

  • @theperfectprogrammer
    @theperfectprogrammer 6 месяцев назад

    the only disappointment I have , is I have just found this channel

  • @purnimakumari7735
    @purnimakumari7735 6 месяцев назад

    Please share the source code

  • @nidhiyadav1570
    @nidhiyadav1570 7 месяцев назад

    I have 2 entities: Table1 : embeddedId -> number, code Table2: embeddedId -> number, code want to left join table2 on table1 using criteriaquery. I am getting error: cannot join basic attibute, tried alomost everything,

  • @chessmaster856
    @chessmaster856 7 месяцев назад

    There is no complex query

  • @yadigarcaliskan6453
    @yadigarcaliskan6453 8 месяцев назад

    Why does spring try to overtake the industry? I don’t like

  • @gustavocarvalho7988
    @gustavocarvalho7988 8 месяцев назад

    This doesn't work, firstly, callable=true already presents an error