Examples of SampleWithPrimitiveId


Examples of org.springframework.data.jpa.domain.sample.SampleWithPrimitiveId

  public void detectsNewStateForEntityWithPrimitiveId() {

    EntityInformation<SampleWithPrimitiveId, Long> information = new JpaMetamodelEntityInformation<SampleWithPrimitiveId, Long>(
        SampleWithPrimitiveId.class, em.getMetamodel());

    SampleWithPrimitiveId sample = new SampleWithPrimitiveId();
    assertThat(information.isNew(sample), is(true));

    sample.setId(5L);
    assertThat(information.isNew(sample), is(false));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.