JPAOverriddenAnnotationReader.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:lams 作者:
/**
 * Adds an @Id annotation to the specified annotationList if the specified element has the id
 * attribute set to true. This should only be the case for many-to-one or one-to-one
 * associations.
 */
private void getAssociationId(List<Annotation> annotationList, Element element) {
    String attrVal = element.attributeValue( "id" );
    if ( "true".equals( attrVal ) ) {
        AnnotationDescriptor ad = new AnnotationDescriptor( Id.class );
        annotationList.add( AnnotationFactory.create( ad ) );
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号