Hmm, I cant find anything about lazy fetching, proxies in relation to
inheritance. Could you point me to the chapter?
I can access the resourceId (by getter on subclass) in the SFSB which
implements the JSF-actionMethod.
Without the ### marked Block in the subclass i get an:
Bean: org.termtimer.model.Room, property: resourceId (not accessible!)
To avoid the transient methods I tried:
- to set "strategy=InheritanceType.JOINED" in subclasses
- to use "@org.hibernate.annotations.Entity(polymorphism =
PolymorphismType.EXPLICIT)" in the superclass
(also i can't see any polymorphism in this case)
To me it seems that seam doesnt recognize the inherited getters and so cant
access the corresponding properties.
Thanks for any help
Dennis
| @Entity
| @Inheritance(strategy=InheritanceType.JOINED)
| abstract class Resource implements Serializable{
|
| private int resourceId;
| private int version;
|
| public Resource(){
| }
|
| @Version
| public Integer getVersion() {
| return version;
| }
|
| public void setVersion(int version) {
| this.version = version;
| }
|
| @Id (generate = GeneratorType.AUTO)
| @Column (name = "id")
| public int getResourceId() {
| return resourceId;
| }
| public void setResourceId(int resourceId) {
| this.resourceId = resourceId;
| }
|
| @Destroy @Remove
| public void destroy() {
| }
|
| }
|
| ______________________________________________
|
| @Entity
| @Name("room")
| @Scope(SESSION)
| @Inheritance
| public class Room extends Resource {
|
| private String roomNumber;
|
| public Room() {
| super();
| }
|
|
| //### is this part needet? ######
| @Transient
| public int getResourceId() {
| return super.getResourceId();
| }
| public void setResourceId(int resourceId) {
| super.setResourceId(resourceId);
| }
| //###############################
|
|
| @Length(min = 1, max=100)
| public String getRoomNumber() {
| return roomNumber;
| }
| public void setRoomNumber(String roomNumber) {
| this.roomNumber = roomNumber;
| }
|
| @Destroy @Remove
| public void destroy() {
| }
|
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922663#3922663
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922663
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user