boutss
February 8, 2023, 4:48pm
1
Hi,
I feel like using meta annotation doesn’t work as shown in the documentation and examples (below) to gather all possible @AnyDiscriminatorValue .
And looking/debugging in the code I only saw this exploiting this annotation from a property without it being able to access a meta annotation (BonderHelper.java).
did I miss something ?
https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibernate_User_Guide.html#associations-any-property
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.userguide.associations.any;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.hibernate.annotations.AnyDiscriminator;
import org.hibernate.annotations.AnyDiscriminatorValue;
import org.hibernate.annotations.AnyKeyJavaClass;
import jakarta.persistence.DiscriminatorType;
This file has been truncated. show original
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.userguide.associations.any;
import org.hibernate.annotations.Any;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.Table;
//tag::associations-any-def-example[]
@Entity
@Table( name = "property_holder" )
public class PropertyHolder2 {
This file has been truncated. show original
beikov
February 9, 2023, 8:59am
2
Since the support for meta annotations is pretty new, there might be some rough edges. Please create an issue in the issue tracker(https://hibernate.atlassian.net ) with a test case(hibernate-test-case-templates/JPAUnitTestCase.java at main · hibernate/hibernate-test-case-templates · GitHub ) that reproduces the issue.