[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4812) Add fetch profile support in annotations

Hardy Ferentschik (JIRA) noreply at atlassian.com
Wed Mar 3 14:08:49 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35721#action_35721 ] 

Hardy Ferentschik commented on HHH-4812:
----------------------------------------

Ok, this are the new annotation I think we have to add for this:

{code}
@Target({ ElementType.TYPE, ElementType.PACKAGE })
@Retention(RetentionPolicy.RUNTIME)
public @interface FetchProfile {
	String name();

	@Target({ ElementType.TYPE, ElementType.PACKAGE })
	@Retention(RUNTIME)
	@interface FetchOverride {
		Class<?>[] entity();

		String association();

		FetchMode mode();
	}
}
{code}

and 

{code}
@Target({ METHOD, FIELD })
@Retention(RUNTIME)
public @interface FetchProfiles {
	public abstract FetchProfile[] profiles();
}
{code}

I don't like the name {{FetchOverride}} so much, but {{@Fetch}} already exists independently to the fetch profile feature (in order to define the fetch type on field/method level). Not sure whether there is a better name.




> Add fetch profile support in annotations
> ----------------------------------------
>
>                 Key: HHH-4812
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4812
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: annotations
>            Reporter: Emmanuel Bernard
>            Assignee: Hardy Ferentschik
>             Fix For: 3.5.0.Next
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list