-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate version 4.3.0.CR1 and annotation @JOINED
PostPosted: Sun Dec 01, 2013 8:52 am 
Newbie

Joined: Sun Dec 01, 2013 7:58 am
Posts: 1
Hi to all

He we migrated to the new version of hibernate in our project, the entity is annotated with inheritance type joined and has parent class AbstractGeneratedUUIDEntity, that has only ID generated and is mapped superclass

@MappedSuperclass
public abstract class AbstractGeneratedEntity extends AbstractEntity.

@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@AttributeOverride(name = AbstractGeneratedEntity .ID_NAME, column = @Column(name =ParentLink.PARENT_LINK_ID, length = 36))
public abstract class AbstractParentLink extends AbstractGeneratedUUIDEntity.

The class has 2 derived classes, ChildLink1, ChildLink2. these both are anotatated as entity
and in the where condition there is some strange condition, with tables when abstractco7_1_ and when abstractco7_2_.
these both are nonexisting tables.

and case
when abstractco7_1_.cost_savings_area_link_id is not null then 1
when abstractco7_2_.cost_savings_area_link_id is not null then 2
when abstractco7_.cost_savings_area_link_id is not null then 0
end=2

which consist of nonexistent table and brings error ERROR [SqlExceptionHelper] user lacks privilege or object not found:
the

ABSTRACTCO7_1_.COST_SAVINGS_AREA_LINK_ID

When i change it to Table_Per_Class inheritance everything starts to work.

Where is the problem?

when abstractco7_1_.parent_link_id is not null then 1
when abstractco7_2_.parent_link_id is not null then 2
when abstractco7_.parent_link_id is not null then 0


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.