Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

166
Visualizações
Best way to map JAXB to a database table

I have an inbound xml which I am mapping to JAXB objects using the xjc tool (to build the pojos)

I am wondering what the best approach is to map these objects to various tables.

An Object / Xml can map to multiple tables which rules hibernate out i think. As a basic solution I believe i need someway to annotate the fields in the objects maybe (via tags in the xsd? i dont know) to database column names.

Has anyone encountered this before?

Thanks

about 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

I guess you need Hyperjaxb3 that provides relational persistence for JAXB objects.

@lexicore is the author about this project.

about 4 years ago · Santiago Trujillo Relatório

0

You can use an extension for xjc - hyperjaxb

  • hyperjaxb2 - Relational persistence for XML data, with JAXB and Hibernate.
  • hyperjaxb3 - Persistence layer for JAXB objects.

For this purpose, hyperjaxb3 will be preferable.

Here is link to some tutorial Generate JPA Java classes from XSD schema file using Maven

about 4 years ago · Santiago Trujillo Relatório

0

It's unclear what accordance between database schema and XML schema is. When there are too few generalizations and coherence between them then it's worst case, you need to couple XML and database by hands for every JAXB entity.

If there're good enough coherence and understandable rules you can try to write own code generator to create code of entities with JAXB and JPA annotations.

Also, try to look to an engine that supports both JAXB and JPA annotations out-of-box: EclipseLink.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda