Rj Jones

Greenhorn
+ Follow
since Mar 20, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rj Jones

Great reply thanks E Armitage

I think (perhaps wrongly) i was thinking more in terms of SQL than object and entities.

I need to search from the GAMES table with the GAME_DESCRIPTION_ID within a certain range (say 1-5). I have added a criteria for this search, but I would have thought the GAME entity requires the descriptionNo to run the search or is JPA clever enough to realize the mappings?
Many thanks for reply E Armitage.

Think it was a bit of a typo sorry, but still getting the same error .....




Also here is the GameDetails entity ....




Reminder of the error message - Repeated column in mapping for entity: Game column: GAME_DESCRIPTION_ID (should be mapped with insert="false" update="false")
Obviosuly a bit new to Hibernate, but I'm struggling if it is possible to do a simple JOIN in JPA/Hibernate ....

I have 2 tables. GAME table and GAME_DESCRIPTION TABLE for example..



I want to map an Entity that contains all the columns of the GAMES table plus the game description from game_description table (so I want to join on the GAME_DESCRIPTION_ID columns from both tables). I tried to map directly to a String ...



But I got a Entity not found java.lang.String error.

So, I then created a GAME_DESCRIPTION entity and tried joining the entities as follows : -



Now I am getting a "Repeated column in mapping for entity: com.sportech.support.jobs.model.sa.Game column: GAME_ID (should be mapped with insert="false" update="false")" error

Any ideas? Many thanks in advance.