Handling '$' in Table name when using hibernate tools to do code generation
开发者_开发百科I am using Hibernate tools (eclipse plugin) to do code generation to create the POJO & th hbm, But table name that contain '$' will make problem. e.g., for table 'Buyer$Souce' will generate a class named 'Buyer.souce'
is there any way to solve this problem? I want to just ignore the '$' ,e.g., 'Buyer$source' generate 'BuyerSouce.java'Thanks
I don't think there is a directly with the Hibernate Tools Plugin. You could generate everything except Buyer$Source and manually code the class for BuyerSource. Use an annotation (or modify the hbm) to set the table name.
@Entity
@Table(name="Buyer$Souce")
public class BuyerSouce {
//...
}
精彩评论