This content has been marked as final.
Show 3 replies
-
1. Re: Problem: OneToOne mapping?
allforjava.allforjava.aol.in Aug 18, 2009 1:30 PM (in response to allforjava.allforjava.aol.in)Dear Team,
I'm unable to update the entity ('WorkLog') only when extending abstract class 'BasePortalObject'. Why?
unable to trace the problem.
One more thing the abstract class 'BasePortalObject' has a collection/set of another entity 'permission' as:
@Entity
@Table(...)
public class Permission{
..
}
public abstract class BasePortalObject implements IPortalObject, java.io.Serializable {
set<Permission> p = new HashSet<Permission>(0);
.
}
Thank you in advance! -
2. Re: Problem: OneToOne mapping?
jamesjmp Aug 18, 2009 4:01 PM (in response to allforjava.allforjava.aol.in) -
3. Re: Problem: OneToOne mapping?
allforjava.allforjava.aol.in Aug 19, 2009 8:02 AM (in response to allforjava.allforjava.aol.in)Thank you Jaime, for the speedy reply!
As suggested I have rechecked and confirm that I have not used the insertable/updatable flags.
The actual problem is as per previous post http://seamframework.org/Community/ProblemOneToOneMapping#comment91585
I'm able to update the entity using WorkLogHome.update towards:
@Entity
public class WorkLog {...}
However, when is define the entity as (extending abstract class):
@Entity
class WorkLog extends BasePortalObject { ...}
the update query is not generated and no modification are reflected in database. However message is generated 'Successfully Updated'.
Note: The code snippet for the base abstract class 'BasePortalObject' is at http://seamframework.org/Community/ProblemOneToOneMapping#comment91585