Reputation: 488
I am facing a a problem using zkoss with hibernate
I have Two models one is JuvenileInfo other is SchoolMeasure
In SchoolMeasure I have created a manyToOne relationship
@Transient @ManyToOne @JoinColumn(name = "juvenile_id", nullable = false) public JuvenileInfo juvenile;
When I access
SessionFactory sessionFactory = new Configuration().configure() .buildSessionFactory();
Session session = sessionFactory.openSession(); session.beginTransaction(); List result1 = session.createQuery( "from ShoolBasedMeasure e inner join e.juvenile ") .list();
I got error juvenile is not property , So anyone can help me how I get parent record list view to show its any column
Upvotes: 1
Views: 59
Reputation: 1502
The error is caused because you're using @Transient annotation. @Transient annotation should be used only on not-persisted attributes, which is probably your problem, simply because Hibernate can't find the transient attributes in the database.
In this case you should do one of the following solutions:
Based on what you are describing, the first solution will probably works, let us know if it solves your problem.
Upvotes: 1