I'm using myeclipse to develop my system.
I have a table named Tapplicationproject in my database.
When I generated the hibernate mapping using myeclipse, The following files were created:
- AbstractTapplicationproject.java
properties that I need (all are accessible from Tapplicationproject.java):
- description
- endDate
- id
- location
- role
- startDate
- tools
- Tapplicationproject.java
properties that I need: (NONE) but I'm using this class to access all fields because this is the child class of AbstractTapplicationproject.java
- TapplicationprojectKey.java
properties that I DESPERATELY need:
- applicationId
- projectName
- Tapplicationproject.hbm.xml
Now, I need to get ALL fields from Tapplicationproject table.
The problem is, the composite primary keys ('applicationId' & 'projectName' properties) are stored ONLY in the TapplicationprojectKey.java and I cannot query this class.
When I tried to query TapplicationprojectKey.java, the compiler said that TapplicationprojectKey is not a persistent class. So I have no idea how to query the 'applicationId' & 'projectName' from the TapplicationprojectKey using the HQL query.
Anyone know the way to work around this?
|