📜
En2Do
  • En2Do
  • Get Started
    • Add as dependency
    • Create the MongoManager
      • MongoManager and ExecutorService
    • Create an Entity
      • Entities without lombok
    • Create the Repository
    • Packing all together
  • METHODS
    • Predefined methods
    • Method keywords
    • Filter keywords
    • AsyncRepository
  • Repository Options
    • What are Repository Options?
    • SeparateEntityId
    • DropEntitiesOnStart
    • DropIndexesOnStart
    • AppendMethodAsComment
  • Usage
    • Sorting
      • Sorting by Annotation
      • Sorting by Parameter
    • Pagination
    • Index
      • Identifier Index
      • Compound Index (Multi-Field-Index)
      • TTL Index
    • Transform
    • Transient
    • TransformField
    • Async
    • UpdateBatch
Powered by GitBook
On this page
  1. Usage

Transient

Ignoring fields in Documents but not in entities.

PreviousTransformNextTransformField

Last updated 2 years ago

CtrlK

en2do allows you to ignore certain fields in entities. This is made possible by the @Transient annotation.

Example of @Transient usage:

// Lombok's annotations go here..
public class Customer {

    @Id // en2do
    UUID uniqueId;

    // Other fields go here...

    @Transient // en2do - Disable saving to database
    String textNotSavedToDatabase;
}