Skip to content

Instantly share code, notes, and snippets.

@rlubke
Last active October 19, 2021 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlubke/f57d1660ae312f2b88a1dcf79d22b7f7 to your computer and use it in GitHub Desktop.
Save rlubke/f57d1660ae312f2b88a1dcf79d22b7f7 to your computer and use it in GitHub Desktop.
Mapping Task as an Entity for use with Micronaut Data Repositories
package com.oracle.coherence.examples.todo.server;
// ...
import io.micronaut.data.annotation.Id;
import io.micronaut.data.annotation.MappedEntity;
// ...
/**
* A data class representing a single To Do List task.
*/
@MappedEntity
public class Task
implements Serializable
{
/// ...
/**
* The task ID.
*/
@Id
private String id;
/// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment