-->
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: @Entity class returning non-entity POJO: hibernate complaint
PostPosted: Mon Mar 16, 2009 11:12 am 
Newbie

Joined: Mon Mar 16, 2009 10:57 am
Posts: 2
Hi all,

I'm new to hibernate but already I get to run successfully my first queries. Now I'm adapting my existing POJOs to get support from hibernate. I added @Entity to my class but it has a member function that returns an object from a class that is not entity.

class B
{
}

@Entity
class A
{
public B myFunction()
{
return new B();
}
}

When hibernate is instantiatiated, it returns an error related to the class B.
I don't need B to be persistent.
Should I annotate B to tell hibernate it is NOT an entity? How to do that?

Thanks in advance
Sammy


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.