Hum, you're shooting yourself in the foot, but anyway.
Can you show me a simplified case that was working in preview 4 and that does not work anymore?
Please explain the comment, "shooting yourself in the foot".
Is there a better way to do this?
Please show me your simplified case
The code is on my home system, but the simple explanation is:
tbl_user contains the columns: firstName, lastName, email, phone, addressId, etc.
there is also a mapping table between tbl_user and tbl_roleType.
The full entity bean, User, contains everything (the composite address object, the collection of role types and all fields).
I want User to inherit from UserDisplayItem which just contains the fields: firstName and lastName. The reason is, I need to display brief user information in a table view and I do not need all the information contained in the full user object.
Shouldn't I be able to mark up both classes with the entity annotations and then just have User extend UserDisplayItem?
Here is the exception I am getting that I wasn't getting before:
02:45:43,398 ERROR [JDBCExceptionReporter] Column not found message from server: "Unknown column
'user0_.TYPE' in 'where clause'"
You can't do that using inheritance.
In Hibernate Annotations you can mark your extra properties as lazy @Basic(LAZY), but I'm not sure it will work in JBoss EJB3, you'll have to check.
Or preferably you can use a special query
"select new UserDisplayItem(u.firstname, u.lastname) from User u"
or use regular projection.