Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 2 weeks ago
JPAContainer Addressbook Demo - Internal key
Hi:
I am modifiying the JPAContainer AddressBook Demo with MySql and I have a couple of classes (Empresa and Autor)
@Entity
public class Empresa {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long idEmpresa;
@NotNull
@Size(min = 2, max = 50)
private String razonSocial;
@Size(min = 2, max = 50)
private String repLegal;
private String direccion;
private String ciudad;
private String telefono;
private String lookFeel;
@OneToMany(mappedBy = "empresa")
private Set<Autor> containerAutores;
And Autor:
@Entity
public class Autor {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long idAutor;
@NotNull
@Size(min = 2, max = 30)
private String autor;
In MySql we have idAutor and idEmprea as INT(11)
In attached files are the source and the output screen
how can display the value of razonSocial in Empresa in place of internal key (com.vaadin.demo.jpaaddressbook.domain.Empresa@1341b06) ?
thanks in advance
Last updated on May, 29th 2012
You cannot reply to this thread.