-->
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: Overiding onetoone association
PostPosted: Thu May 22, 2008 2:08 am 
Regular
Regular

Joined: Sun Apr 13, 2008 3:04 am
Posts: 71
Location: Bangalore
Hi,

I have a parent class

@MappedSuperclass
public abstract class UserAssociated extends Persistant
{
@OneToOne(optional = false, cascade = CascadeType.ALL)
@JoinColumn(name = "fk_user")
private User user;
..


}

like this however in the child class, I need to over ride the defiantion

@OneToOne(optional = false, cascade = CascadeType.ALL)
to

@ManyToOne(optional = false, cascade = CascadeType.ALL)

is this possible..

I see similar overiding for @AttributeOverrides and @AssociationOverrides.. but none seem to accept this kind of override.

Any clues pl.

Regards,
Nagendra

_________________
Raja Nagendra Kumar,
C.T.O
http://www.tejasoft.com
TejaSoft - Specialists in Code Audit, Unit Testing and Merciless Re-factoring - Engineering Crisis Turnaround Experts


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.