|
39 | 39 | import org.springframework.util.Assert;
|
40 | 40 |
|
41 | 41 | /**
|
42 |
| - * {@link JpaPersistentProperty} implementation usind a JPA {@link Metamodel}. |
| 42 | + * {@link JpaPersistentProperty} implementation using a JPA {@link Metamodel}. |
43 | 43 | *
|
44 | 44 | * @author Oliver Gierke
|
45 | 45 | * @author Thomas Darimont
|
@@ -130,10 +130,19 @@ public Class<?> getActualType() {
|
130 | 130 | */
|
131 | 131 | @Override
|
132 | 132 | public Iterable<? extends TypeInformation<?>> getPersistentEntityTypes() {
|
| 133 | + return getPersistentEntityTypeInformation(); |
| 134 | + } |
| 135 | + |
| 136 | + /* |
| 137 | + * (non-Javadoc) |
| 138 | + * @see org.springframework.data.mapping.model.AbstractPersistentProperty#getPersistentEntityTypeInformation() |
| 139 | + */ |
| 140 | + @Override |
| 141 | + public Iterable<? extends TypeInformation<?>> getPersistentEntityTypeInformation() { |
133 | 142 |
|
134 | 143 | return associationTargetType != null //
|
135 | 144 | ? Collections.singleton(associationTargetType) //
|
136 |
| - : super.getPersistentEntityTypes(); |
| 145 | + : super.getPersistentEntityTypeInformation(); |
137 | 146 | }
|
138 | 147 |
|
139 | 148 | /*
|
@@ -219,22 +228,22 @@ public boolean isEmbeddable() {
|
219 | 228 |
|
220 | 229 | /*
|
221 | 230 | * (non-Javadoc)
|
222 |
| - * @see org.springframework.data.mapping.model.AnnotationBasedPersistentProperty#getAssociationTargetType() |
| 231 | + * @see org.springframework.data.mapping.model.AnnotationBasedPersistentProperty#getAssociationTargetTypeInformation() |
223 | 232 | */
|
224 | 233 | @Override
|
225 |
| - public Class<?> getAssociationTargetType() { |
| 234 | + public TypeInformation<?> getAssociationTargetTypeInformation() { |
226 | 235 |
|
227 | 236 | if (!isAssociation()) {
|
228 | 237 | return null;
|
229 | 238 | }
|
230 | 239 |
|
231 | 240 | if (associationTargetType != null) {
|
232 |
| - return associationTargetType.getType(); |
| 241 | + return associationTargetType; |
233 | 242 | }
|
234 | 243 |
|
235 |
| - Class<?> targetType = super.getAssociationTargetType(); |
| 244 | + TypeInformation<?> targetType = super.getAssociationTargetTypeInformation(); |
236 | 245 |
|
237 |
| - return targetType != null ? targetType : getActualType(); |
| 246 | + return targetType != null ? targetType : getActualTypeInformation(); |
238 | 247 | }
|
239 | 248 |
|
240 | 249 | /**
|
|
0 commit comments