You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Udi <Sa...@gmail.com> on 2009/02/17 08:34:59 UTC
"detected possible orphand..."
Hey,
I faced the warning: detected possible orphand to deleted object
"test.House-123" in "test.House.owner".
I read that this might be a bug in openJPA, and in JIRA I read that if the
problem happens in Many-to-one relation, the @Nonpolymorphic can resolve the
issue.
The thing is I must use polymorphic objects. These are my classes:
class House
{
@ManyToOne
private Owner owner;
}
abstract class Owner
{
....
}
class BigOwner extends Owner
{
}
class SmallOwner extends Owner
{
}
Obviously, house's field owner must be of BigOwner or SmallOwner.
Is there any solution for this case?
thanks,
Udi
--
View this message in context: http://n2.nabble.com/%22detected-possible-orphand...%22-tp2339495p2339495.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: "detected possible orphaned..."
Posted by Udi <Sa...@gmail.com>.
Hey pinaki, thanks for the comment, sorry for the late response...
I did'nt try build-time anhancement, cause I found sort of solution. I found
out that refresh() works a bit different, therefore when I first handle a
new entity, I do em.refresh(entity) and the entity's fields are fully
updated afterwards.
Thanks anyway
--
View this message in context: http://n2.nabble.com/%22detected-possible-orphaned...%22-tp2339495p2427979.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: "detected possible orphaned..."
Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
Are you enhancing persistent classes at build-time? If not, please do and
report back if the problem persists.
Pinaki
Udi wrote:
>
> Hey,
> I faced the warning: detected possible orphaned to deleted object
> "test.House-123" in "test.House.owner".
> I read that this might be a bug in openJPA, and in JIRA I read that if the
> problem happens in Many-to-one relation, the @Nonpolymorphic can resolve
> the issue.
> The thing is I must use polymorphic objects. These are my classes:
>
> class House
> {
> @ManyToOne
> private Owner owner;
> }
>
> abstract class Owner
> {
> ....
> }
>
> class BigOwner extends Owner
> {
> }
>
> class SmallOwner extends Owner
> {
> }
>
> Obviously, house's field owner must be of BigOwner or SmallOwner.
> Is there any solution for this case?
>
> thanks,
> Udi
>
--
View this message in context: http://n2.nabble.com/%22detected-possible-orphaned...%22-tp2339495p2343682.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.