Hi Jeroen,
This is exactly what I have - see [1] [2] - and it worked alright until added two new subclasses just now (ProfileElementTimePeriod and ProfileElementUseTimePeriod). I discovered the freeze issue when adding fixtures, because with HSQLDB in-memory it works alright when I test manually. After that I discovered that adding manually in MySQL does not work. [1] https://github.com/johandoornenbal/matching/blob/master/dom/src/main/java/info/matchingservice/dom/Profile/ProfileElement.java [2] https://github.com/johandoornenbal/matching/blob/master/dom/src/main/java/info/matchingservice/dom/Profile/ProfileElementTimePeriod.java Hi Johan, I can only tell you how I do it: On the subclass: @javax.jdo.annotations.PersistenceCapable @javax.jdo.annotations.Inheritance( strategy = InheritanceStrategy.SUPERCLASS_TABLE) On the superclass: @javax.jdo.annotations.PersistenceCapable( identityType = IdentityType.DATASTORE) @javax.jdo.annotations.Inheritance( strategy = InheritanceStrategy.NEW_TABLE) @javax.jdo.annotations.Discriminator( strategy = DiscriminatorStrategy.CLASS_NAME, column = "discriminator") @javax.jdo.annotations.DatastoreIdentity( strategy = IdGeneratorStrategy.IDENTITY, column = "id") And on the LocalDate properties of the subclass: @Persistent private LocalDate paymentDate; @Column(allowsNull = "true") public LocalDate getPaymentDate() { return paymentDate; } HTH On 18 February 2015 at 14:28, wrote: > Hi, > > > > I encounter a problem with using JDO inheritance strategy="superclass-table". > > When trying to create an instance for the first time (Type LocalDate) my > application freezes. > > Last output below. > > > > Anybody encountered this before? > > > > I have tested with MySQL (then it hangs as well with creating fixtures as > with creating instance manually) > > and HSQLDB in-memory (then it hangs only with fixtures, not when creating > manually) > > > > gtrz Johan > > > > > 14:20:45,798 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Table ProfileElement will manage the persistence of the fields for > class info.matchingservice.dom.Profile.ProfileElementTimePeriod (inheritance > strategy="superclass-table") > > 14:20:45,798 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Column "ProfileElement.endDate" added to internal representation of > table. > > 14:20:45,798 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Field > [info.matchingservice.dom.Profile.ProfileElementTimePeriod.endDate] -> > Column(s) [ProfileElement.endDate] using mapping of type > "org.datanucleus.store.rdbms.mapping.JodaLocalDateMapping" > (org.datanucleus.store.rdbms.mapping.datastore.DateRDBMSMapping) > > 14:20:45,798 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Column "ProfileElement.startDate" added to internal representation of > table. > > 14:20:45,798 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Field > [info.matchingservice.dom.Profile.ProfileElementTimePeriod.startDate] -> > Column(s) [ProfileElement.startDate] using mapping of type > "org.datanucleus.store.rdbms.mapping.JodaLocalDateMapping" > (org.datanucleus.store.rdbms.mapping.datastore.DateRDBMSMapping) > > 14:20:45,799 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Schema Transaction started with connection > "org.datanucleus.store.rdbms.datasource.dbcp.PoolingDataSource$PoolGuardConnectionWrapper@9a8252e" > with isolation "serializable" > > 14:20:45,800 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Check of existence of ProfileElement returned table type of TABLE > > 14:20:45,800 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Loading column info for table(s) "Assessment, > DropDownForProfileElement, Config, Supply, TagHolder, Demand, > PersistedProfileElementComparison, DemandAssessment, ProfileMatch, > SystemRole, IsisSecurityApplicationUser, TagCategory, > ProfileElementTypeMatchingRule, Actor, Tag, ProfileTypeMatchingRule, System, > ProfileComparison, Competence, ProfileAssessment, OrganisationRole, > CompetenceCategory, IsisSecurityApplicationTenancy, Profile, Organisation, > ProfileElement, IsisSecurityApplicationPermission, > IsisSecurityApplicationRole, IsisSecurityApplicationUserRoles, > MatchingTrustedContact, Role, SupplyAssessment, Person, PersonRole" in > Catalog "", Schema "" > > 14:20:45,873 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Column info loaded for Catalog "", Schema "", 34 tables, time = 73 ms > > 14:20:45,873 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Column info retrieved for table "ProfileElement" : 15 columns found > > 14:20:45,873 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Creating column startDate for table ProfileElement > > 14:20:45,873 [Schema 1593650877@qtp-1528405038-0 > DEBUG] Creating column endDate for table ProfileElement > > 14:20:45,873 [Schema 1593650877@qtp-1528405038-0 > DEBUG] ALTER TABLE ProfileElement ADD COLUMN startDate DATE NULL > > >
