Hibernate-mapping

本文详细介绍了Hibernate映射配置文件中的属性参数设置,包括属性的名称、类型、是否允许为空等关键信息,并探讨了column定义及类级别的配置选项。此外,还介绍了如何通过实现Hibernate的NamingStrategy接口来自定义命名策略。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Hibernate has a hibernate-mapping config file. There are a property attribute in it. The following is the property's parameters


Property:
1. name
2. type
3. column
4. not-null
5. update = 'true'
6. insert = 'true'
7. access = 'property' or 'field' or 'customer class' which must implements org.hibernate.property.PropertyAccessor interface.
8. formula


Column:
1. name
2. length
3. not-null
4. unique
5. index


Class:
1. name
2. table
3. lazy
4. mutable
5. dynamic-update = 'false'
6. dynamic-insert = 'false'
7. schema



Hibernate-mapping:
1. package
2. schema



Create a naming stragegy. Need to extends the class:

Interface: org.hibernate.cfg.NamingStrategy
1. org.hibernate.cfg.DefaultNamingStragegy
2. org.hibernate.cfg.ImprovedNamingStragegy

Developers also can extends the two stragegy to implement your naming stragegy.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值