Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsClassDescriptor.getTable() NULL
https://www.eclipse.org/forums/index.php/mv/msg/331431/846662/#msg_846662
Below is strucuturefor single table inheritance
@Table(name = "REL_PROVIDERS")
@DiscriminatorValue("INPR")
@Cacheable(false) // If not leads to recursion in TLG
public class IndividualProviderDomain extends IndividualProviderPersistable
@MappedSuperclass
public abstract class IndividualProviderPersistable extends ProviderDomain implements IndividualProvider, DynamicLanguageAware
@Entity
@Configurable
@Table(name = "REL_PROVIDERS")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "SUBTYPE", discriminatorType = DiscriminatorType.STRING, length = 20)
@Cacheable(false) // If not leads to recursion in TLG
public class ProviderDomain extends ProviderPersistable
@MappedSuperclass
public abstract class ProviderPersistable implements Provider, DynamicFieldDynamicLanguageAware
In session customizing phase when I grab a class descriptor on IndividualProviderDomain and call getTableName() on it I get NULL.
I debugged the EntityProcessor.processTableAndInheritance() and found that
if (hasInheritance() || ! rootDescriptor.usesSingleTableInheritanceStrategy()) {
processTable();
}
is never hit
hasInteritance() >>> false as I have not put @Inheritance on IndividualProviderDomain (Is it required????) and
rootDescriptor (ProviderDomain).usesSingleTableInheritanceStrategy() == true
so the processTable is never hit and no meta data for table.
Also I have observed if I have put the IndividuaProvdier on GridCache, TLG code goes in to recursion, which composing entity, I am not sure, whether these as related issue.
Looking for suggestions
Thanks,
Gaurav Malhotra
Oracle NL]]>Gaurav Malhotra2012-04-16T14:53:07-00:00Re: ClassDescriptor.getTable() NULL
https://www.eclipse.org/forums/index.php/mv/msg/331431/846663/#msg_846663
Gaurav Malhotra2012-04-16T14:56:44-00:00Re: ClassDescriptor.getTable() NULL
https://www.eclipse.org/forums/index.php/mv/msg/331431/846675/#msg_846675
Change IndividualProviderPersistable to be an @Entity.
]]>James Sutherland2012-04-16T15:59:05-00:00Re: ClassDescriptor.getTable() NULL
https://www.eclipse.org/forums/index.php/mv/msg/331431/846784/#msg_846784
I was wondering what is reason behind this? @MappedSupperClass cannot extend an entity?
]]>Gaurav Malhotra2012-04-16T18:52:48-00:00Re: ClassDescriptor.getTable() NULL
https://www.eclipse.org/forums/index.php/mv/msg/331431/847375/#msg_847375
@Entity
public abstract class IndividualProviderPersistable extends ProviderDomain implements IndividualProvider, DynamicLanguageAware ]]>Gaurav Malhotra2012-04-17T08:38:17-00:00Re: ClassDescriptor.getTable() NULL
https://www.eclipse.org/forums/index.php/mv/msg/331431/847392/#msg_847392
@Entity
@Configurable
@Table(name = "REL_PROVIDERS")
@DiscriminatorValue("INPR") @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class IndividualProviderDomain extends IndividualProviderPersistable {