Skip to content

Commit

Permalink
correct mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille committed Oct 4, 2024
1 parent 1b2f3ac commit 1c533e7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/src/main/java/io/github/mmm/entity/id/Id.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package io.github.mmm.entity.id;

import java.time.Instant;
import java.util.function.Supplier;

import io.github.mmm.entity.Entity;

Expand Down Expand Up @@ -45,7 +46,7 @@
* @see AbstractId
* @since 1.0.0
*/
public interface Id<E> {
public interface Id<E> extends Supplier<Object> {

/** Marshalling property name of the {@link #getPk() primary-key}. */
String PROPERTY_PK = "pk";
Expand Down Expand Up @@ -76,6 +77,12 @@ public interface Id<E> {
*/
Object getPk();

@Override
default Object get() {

return getPk();
}

/**
* @return the {@link #getPk() primary key} as {@link String} for marshalling.
*/
Expand Down

0 comments on commit 1c533e7

Please sign in to comment.