six2six / fixture-factory

Generator fake objects from a template
Apache License 2.0
445 stars 88 forks source link

HibernateProcessor + Embedded Object #45

Closed nykolaslima closed 10 years ago

nykolaslima commented 10 years ago

When we have Embedded class, we shouldn't call #session.save.

@Entity
public class Place {
  @Embedded
  private Address address;
}

@Embeddable
public class Address {
}

With the above example, when we call Fixture.from(Place.class) then Fixture-Factory is calling session.save(address) and it throws an Exception: org.hibernate.MappingException: Unknown entity

nykolaslima commented 10 years ago

Closing because it was fixed by commit 4237e01d94afc2e45363779aa41a3f2afe5105bc