Yep. Brilliant!

So the issue is know ;-)



Tnx Johan 







On 19 February 2015 at 14:31,  wrote:

>
> I cannot find anything in my code that is different from what I used to do
> with the other subclasses...
>
> So I wonder: Are there any known limitations to using a Superclass table?
> Like you cannot add columns to a table that has data already? (I think I
> noticed that columns are added to the superclass table on the moment a
> first persistence takes place..)
>
>
Hmm, I might have an idea

I have seen strange things happen when the DataNucleus metamodel is not
fully initialized and then the app starts using the system.   We definitely
hit a bug in Estatio a long while back that we traced to this.

Isis tries to take care of building the DN metamodel this automatically,
which it does primarily by looking for entities that are annotated with
@PersistenceCapable and passing them into the bootstrapping of DN [1].
However, I have a suspicion that this is currently slightly broken; there's
a ticket open [2] to explore.

Meanwhile, the workaround is to write some dummy actions on a dummy service
that ensure that Isis knows about these entities before initializing DN,
for example:

@DomainService
public class DummyServiceForBootstrapping {

    @Hidden
    public void ensureKnownEagerly(SomeSubtype1 x) { }
    @Hidden
    public void ensureKnownEagerly(SomeSubtype2 x) { }
    @Hidden
    public void ensureKnownEagerly(SomeSubtype3 x) { }

}


Try that out, please report back...

Dan


[1]
https://github.com/apache/isis/blob/master/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusApplicationComponents.java#L106
[2] https://issues.apache.org/jira/browse/ISIS-847

         

Reply via email to