You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Jo...@filternet.nl on 2015/02/18 14:28:26 UTC
Problem with inheritance strategy="superclass-table"
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
Re: Problem with inheritance strategy="superclass-table"
Posted by Jeroen van der Wal <je...@stromboli.it>.
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, <Jo...@filternet.nl> 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
>
>
>