Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OGM-783 Update test related to embeddedable associations
Change the test to work with a multi-path game scenario and update the queries for the existing tests.
- Loading branch information
Showing
15 changed files
with
602 additions
and
579 deletions.
There are no files selected for viewing
70 changes: 0 additions & 70 deletions
70
core/src/test/java/org/hibernate/ogm/backendtck/queries/AnEmbeddable.java
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
core/src/test/java/org/hibernate/ogm/backendtck/queries/EmbeddedCollectionItem.java
This file was deleted.
Oops, something went wrong.
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
73 changes: 73 additions & 0 deletions
73
core/src/test/java/org/hibernate/ogm/backendtck/queries/OptionalStoryBranch.java
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,73 @@ | ||
/* | ||
* Hibernate OGM, Domain model persistence for NoSQL datastores | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
package org.hibernate.ogm.backendtck.queries; | ||
|
||
import javax.persistence.Embeddable; | ||
|
||
import org.hibernate.search.annotations.Analyze; | ||
import org.hibernate.search.annotations.Field; | ||
import org.hibernate.search.annotations.IndexedEmbedded; | ||
import org.hibernate.search.annotations.Store; | ||
|
||
@Embeddable | ||
public class OptionalStoryBranch { | ||
|
||
// Store.YES for filtering in query | ||
// Analyze.NO for projection in query | ||
@Field(store = Store.YES, analyze = Analyze.NO) | ||
private String evilText; | ||
|
||
@Field(store = Store.YES, analyze = Analyze.NO) | ||
private String goodText; | ||
|
||
@IndexedEmbedded | ||
private Ending evilEnding; | ||
|
||
@IndexedEmbedded | ||
private Ending goodEnding; | ||
|
||
public OptionalStoryBranch() { | ||
} | ||
|
||
public OptionalStoryBranch(String evilText, String goodText, Ending evilEnding) { | ||
this.evilText = evilText; | ||
this.goodText = goodText; | ||
this.evilEnding = evilEnding; | ||
} | ||
|
||
public String getEvilText() { | ||
return evilText; | ||
} | ||
|
||
public void setEvilText(String embeddedString) { | ||
this.evilText = embeddedString; | ||
} | ||
|
||
public Ending getEvilEnding() { | ||
return evilEnding; | ||
} | ||
|
||
public void setEvilEnding(Ending anotherEmbeddable) { | ||
this.evilEnding = anotherEmbeddable; | ||
} | ||
|
||
public String getGoodText() { | ||
return goodText; | ||
} | ||
|
||
public void setGoodText(String anotherItem) { | ||
this.goodText = anotherItem; | ||
} | ||
|
||
public Ending getGoodEnding() { | ||
return goodEnding; | ||
} | ||
|
||
public void setGoodEnding(Ending goodEnding) { | ||
this.goodEnding = goodEnding; | ||
} | ||
} |
Oops, something went wrong.