I have two entity class Category and Events.I need to join both the tables and fetch all records which matching the given condition
This query should do the job:
from Category as c inner join c.events as e where c.parentCategoryId = 1
Plus you seem to have a typo (missing "d" at the end) here:
@JoinColumn(name="category_i"))