wood burning stoves*
The moose likes Object Relational Mapping and the fly likes (JPA) can I map the inner class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "(JPA) can I map the inner class?" Watch "(JPA) can I map the inner class?" New topic
Author

(JPA) can I map the inner class?

Cainiao Zou
Ranch Hand

Joined: Mar 03, 2009
Posts: 36
In an entity bean, can I define inner class (not static inner class)? Can I map them in JPA or Hibernate?
thanks
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 513

Hibernate doesn't throw any restrictions on including one, though I haven't tried one and not sure if it might throw any exceptions.
My real question would be, Why would you want to have a inner class?. We can design it better.


If you are not laughing at yourself, then you just didn't get the joke.
Cainiao Zou
Ranch Hand

Joined: Mar 03, 2009
Posts: 36
Arun Kumarr wrote:Hibernate doesn't throw any restrictions on including one, though I haven't tried one and not sure if it might throw any exceptions.
My real question would be, Why would you want to have a inner class?. We can design it better.


I just got a problem about embedded classes. I don't need inner class if I use the embedded classes. But I got error when I try to nest the embedded class (define an embedded class in an embeddable class).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: (JPA) can I map the inner class?