HHH-16633 test for AccessType.PROPERTY in @Find method parameter matching
This commit is contained in:
parent
8681d702a4
commit
5c5d2c2f94
|
@ -0,0 +1,15 @@
|
|||
package org.hibernate.jpamodelgen.test.dao;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class Bean {
|
||||
@Id
|
||||
public Long getKey() {
|
||||
return 69L;
|
||||
}
|
||||
public String getText() {
|
||||
return "Hello World";
|
||||
}
|
||||
}
|
|
@ -60,4 +60,10 @@ public interface Dao {
|
|||
|
||||
@SQL("select * from Book where isbn = :isbn")
|
||||
Book findByIsbnNative(String isbn);
|
||||
|
||||
@Find
|
||||
Bean beanByIdProperty(Long key);
|
||||
|
||||
@Find
|
||||
List<Bean> beansForText(String text);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import static org.hibernate.jpamodelgen.test.util.TestUtil.assertMetamodelClassG
|
|||
*/
|
||||
public class DaoTest extends CompilationTest {
|
||||
@Test
|
||||
@WithClasses({ Book.class, Dao.class, StatefulDao.class, StatelessDao.class })
|
||||
@WithClasses({ Book.class, Dao.class, Bean.class, StatefulDao.class, StatelessDao.class })
|
||||
public void testGeneratedAnnotationNotGenerated() {
|
||||
System.out.println( TestUtil.getMetaModelSourceAsString( Dao.class ) );
|
||||
System.out.println( TestUtil.getMetaModelSourceAsString( StatefulDao.class ) );
|
||||
|
|
Loading…
Reference in New Issue