Closed GoogleCodeExporter closed 9 years ago
Can you please provide an example of a Java class and the corresponding YAML
document?
Original comment by aso...@gmail.com
on 8 Mar 2010 at 11:26
Thanks for changing the issue to Enhancement. I couldn't change it after
hitting the
send button too early.
A sample class would be:
public class SampleDomainClass {
@Inject
private transient Dependecy dependency;
private Long id;
private String invoiceAddress;
private Customer customer;
public Long getId() {
return id;
}
public setCustomer(Customer customer) {
invoiceAddress = customer.getInvoiceAddress().clone();
this.customer = customer;
}
public Customer getCustomer() {
return customer;
}
public String getInvoiceAddress() {
return invoiceAddress;
}
}
Which should be loaded from
id: 5
invoiceAddress: Old Samplestreet 452, Some Town
customer:
invoiceAddress: New Samplestreet 123, Some Town
invoiceAddress should still have the value "Old Samplestreet 452, Some Town"
after
deserialization. This is a pattern that re-appears in accounting where an
invoice
must always retain the data that was send out to the receiver no matter if the
customer changes his address after the invoice was sent out.
Original comment by m...@ivu.de
on 9 Mar 2010 at 3:22
I did not quite catch you. What do you expect to achieve ? Do you wish to skip
setCustomer(Customer customer) and set fields directly to keep both addresses ?
Can you may be provide a link to see related Hibernate code ?
Original comment by aso...@gmail.com
on 9 Mar 2010 at 4:08
Original issue reported on code.google.com by
m...@ivu.de
on 8 Mar 2010 at 5:33