This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes @Column annotation is ignored in Embedded object:Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "@Column annotation is ignored in Embedded object:Hibernate" Watch "@Column annotation is ignored in Embedded object:Hibernate" New topic
Author

@Column annotation is ignored in Embedded object:Hibernate

Vimal Kumar Venugopal
Ranch Hand

Joined: Aug 20, 2011
Posts: 43

Howdy Ranchers,

I have been trying out a few Hibernate sample programs and encountered the following problem:

I have an embedded object,


And the Entity object using this class is,


And the hibernate.cfg.xml as,


There is no error and the inserts are working fine. But while the @Column name is picked up from the entity class, the @Column from the embedded class seems to get ignored.

If you could help me out, I would be greatly privileged!

Thanks a ton

"Value has a Value only if its value is valued!"
 
Don't get me started about those stupid light bulbs.
 
subject: @Column annotation is ignored in Embedded object:Hibernate