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
|