@CreationTimestamp should not be declared @Inherited
This commit is contained in:
parent
457872dbdd
commit
e908d4c8f6
|
@ -8,9 +8,9 @@ package org.hibernate.annotations;
|
|||
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.hibernate.tuple.CreationTimestampGeneration;
|
||||
|
@ -29,7 +29,7 @@ import org.hibernate.tuple.CreationTimestampGeneration;
|
|||
* @see CurrentTimestamp
|
||||
*/
|
||||
@ValueGenerationType(generatedBy = CreationTimestampGeneration.class)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Retention(RUNTIME)
|
||||
@Target({ FIELD, METHOD })
|
||||
public @interface CreationTimestamp {
|
||||
/**
|
||||
|
|
|
@ -6,14 +6,16 @@
|
|||
*/
|
||||
package org.hibernate.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.hibernate.tuple.GenerationTiming;
|
||||
|
||||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* Specifies that the annotated field of property is a generated timestamp,
|
||||
* and also specifies the {@linkplain #timing() timing} of the timestamp
|
||||
|
@ -56,9 +58,8 @@ import org.hibernate.tuple.GenerationTiming;
|
|||
* @see CreationTimestamp
|
||||
*/
|
||||
@ValueGenerationType(generatedBy = CurrentTimestampGeneration.class)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target( { ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE } )
|
||||
@Inherited
|
||||
@Retention(RUNTIME)
|
||||
@Target({ FIELD, METHOD, ANNOTATION_TYPE })
|
||||
public @interface CurrentTimestamp {
|
||||
/**
|
||||
* Determines when the timestamp is generated. But default, it is updated
|
||||
|
|
|
@ -8,9 +8,9 @@ package org.hibernate.annotations;
|
|||
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.hibernate.tuple.UpdateTimestampGeneration;
|
||||
|
@ -29,7 +29,7 @@ import org.hibernate.tuple.UpdateTimestampGeneration;
|
|||
* @author Gunnar Morling
|
||||
*/
|
||||
@ValueGenerationType(generatedBy = UpdateTimestampGeneration.class)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Retention(RUNTIME)
|
||||
@Target({ FIELD, METHOD })
|
||||
public @interface UpdateTimestamp {
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue