NM-26: Port CatalogBrand and CatalogType entities to JPA#10
Open
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Create model/CatalogBrand.java and model/CatalogType.java with: - @entity and @table annotations matching EF6 table names - @id with GenerationType.IDENTITY - @NotNull and @SiZe(max=100) matching EF6 Required + MaxLength(100) - @column constraints mirroring the fluent config in CatalogDBContext.cs - Business-key equals/hashCode per Java best practices
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the
CatalogBrandandCatalogTypeentities from .NET EF6 fluent configuration (CatalogDBContext.cslines 29–55) to Java 21 JPA entity classes undercom.eshop.modernized.model.Mapping from EF6 → JPA:
.ToTable("CatalogBrand")/.ToTable("CatalogType")@Table(name = "CatalogBrand")/@Table(name = "CatalogType").HasKey(ci => ci.Id)+.IsRequired()@Id+@GeneratedValue(strategy = GenerationType.IDENTITY).IsRequired()@NotNull+@Column(nullable = false).HasMaxLength(100)@Size(max = 100)+@Column(length = 100)Both entities include:
protected)equals()/hashCode()on business key (brand/type), not generated IDtoString()returning the business fieldReview & Testing Checklist for Human
Required→@NotNull,MaxLength(100)→@Size(max=100))@Table(name=...)values match the original .NET table names exactly (CatalogBrand,CatalogType)@GeneratedValue(strategy = GenerationType.IDENTITY)is the correct ID strategy for your target database (the original EF6 config did not specifyDatabaseGeneratedOption.Nonefor these entities, so auto-increment is appropriate)Notes
Integerwrapper type for@Idfields so Spring Data JPAisNew()detection works correctly (null = new entity)jakarta.validation.constraints.*) used per Spring Boot 3.x / Jakarta EELink to Devin session: https://partner-workshops.devinenterprise.com/sessions/50274beec75e4586b5a8f4cd4a652a97