-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1287 Fix @DiffIgnoreProperties interference with JaversType resolution
- Loading branch information
1 parent
975d4d9
commit 9a9337b
Showing
2 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
30 changes: 30 additions & 0 deletions
30
...ore/src/test/groovy/org/javers/core/cases/Case1287ValueObjectWithIgnoredProperties.groovy
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.javers.core.cases | ||
|
||
import jakarta.persistence.Id | ||
import org.javers.core.Javers | ||
import org.javers.core.JaversBuilder | ||
import org.javers.core.metamodel.annotation.DiffIgnoreProperties | ||
import org.javers.core.metamodel.annotation.ValueObject | ||
import org.javers.core.metamodel.type.ValueObjectType | ||
import spock.lang.Specification | ||
|
||
class Case1287ValueObjectWithIgnoredProperties extends Specification { | ||
|
||
@ValueObject | ||
@DiffIgnoreProperties("id") | ||
class MyValueObject { | ||
|
||
@Id | ||
private UUID id; | ||
|
||
private String property; | ||
} | ||
|
||
def "should recognize class as a value object type"() { | ||
given: | ||
Javers javers = JaversBuilder.javers().build() | ||
|
||
expect: | ||
javers.getTypeMapping( MyValueObject ) instanceof ValueObjectType | ||
} | ||
} |