JPA Entities & Relationships
JPA entities with @Entity, @Id, relationships (@OneToMany, @ManyToOne, @ManyToMany), @JoinColumn, cascade
1Which annotation marks a class as a JPA entity?
Which annotation marks a class as a JPA entity?
Cevap
@Entity is the mandatory annotation to declare a class as a JPA entity that will be mapped to a database table. Without this annotation, the EntityManager cannot manage the object's lifecycle. Each entity must also have a unique identifier annotated with @Id to be valid.
2Which annotation defines the primary key of a JPA entity?
Which annotation defines the primary key of a JPA entity?
Cevap
@Id identifies the field that will serve as the primary key for the entity. This annotation is mandatory on at least one field of each entity. The primary key guarantees the uniqueness of each record and allows JPA to properly manage merge, refresh, and remove operations.
3Which annotation customizes a column name in the database?
Which annotation customizes a column name in the database?
Cevap
@Column allows customizing the mapping between a Java field and a database column, particularly to define the column name, its length, whether it accepts null values, or if it is unique. Without this annotation, JPA uses the Java field name as the default column name.
How to specify a table name different from the class name?
Which @GeneratedValue strategy uses a database sequence?
+27 mülakat soruları
Diğer Spring Boot mülakat konuları
Spring Core - IoC & DI
Spring Boot Auto-Configuration
Spring Boot Starters
Application Properties & YAML
Logging with SLF4J & Logback
Spring Boot DevTools
Spring MVC Basics
Spring REST Controllers
Request & Response Handling
Exception Handling
Bean Validation
Spring Data JPA Basics
JPA Queries
Spring Data Repositories
Spring Security Basics
Spring Boot Actuator
Unit Testing with JUnit & Mockito
Spring Boot Testing
Profiles & Environment
RestTemplate & WebClient
Async & Scheduling
Caching with Spring
Spring WebFlux (Reactive)
Spring Transactions
Advanced Authentication & Authorization
JWT & Stateless Security
OAuth2 & Authorization Server
Spring Boot & Docker
Microservices with Spring
Spring Cloud Config
Performance Optimization
GraalVM Native Images
Bir sonraki mülakatın için Spring Boot'de uzmanlaş
Tüm sorulara, flashcards'a, teknik testlere, code review alıştırmalarına ve mülakat simülatörlerine eriş.
Ücretsiz başla