Open tmussi opened 5 years ago
Hi @tmussi thanks for detailed issue report. Is there any chance you can share this modified version?
Additional question - in your personal project what exact environment you are running tests against? This like those on the list below would greatly help troubleshooting
Sorry for late reply.
I provided some changes over arquillian-persistence-tutorial on my github. Please, have a look: https://github.com/tmussi/arquillian-examples
You will find everything on GamePersistenceTest.java
related to both JPA entities: Game
and GameReview
. There, you will also find two test cases:
shouldFindGameReviewWithGame
where I try to get GameReview with Game entity fetched .shouldFindAllGamesAndReviewsJpqlQuery
where I try to get Game with the list of GameReview loaded.Edit: I'm running tests from Eclipse through JUnit (righ click on GamePersistenceTest class > Run As > JUnit Test)
Thanks, I will have a look
Issue Overview
Relationship mapped with
@OneToMany
always returning an empty list.I made some changes on Arquillian Persistence Tutorial adding
consoles
attribute onGame.java
as you can see below:And creating a new class called
Console.java
Expected Behaviour
On
GamePersistenceTest.java
class, I updated the methodinsertData()
to look like this:But, when I get the
Game
from the database it is always returning me an empty listAnd when I try get the consoles on Console table on database, I can retrieve all of them associated with a
Game
.Current Behaviour
When I get a
Game
from the database it is always returning me an empty list.Additional Information
All changes was made over Arquillian Persistence Tutorial I'm running
GamePersistenceTest.java
as a JUnit Test on Eclipse IDE Version: Oxygen.2 (4.7.2)I'm facing this problem on a personal project when running on a JUnit environment, but if I publish it on my local WebLogicServer I do not have this problem and the list returns with the expected result.