Menu

#234 Parent reference null on EntityValidator

v4.3.1
closed
nobody
None
5
2012-01-04
2011-10-19
No

Al momento de validar una entidad dentro de una colección el valor siempre es null, se puede entender mejor realizando seguimiento a este hilo https://sourceforge.net/projects/openxava/forums/forum/437013/topic/4762281

Cordialmente,

Nelson Flórez

Discussion

  • Javier Paniza

    Javier Paniza - 2012-01-04
    • summary: Error al validar entidad --> Parent reference null on EntityValidator
    • milestone: 2139387 --> v4.3.1
    • status: open --> closed
     
  • Javier Paniza

    Javier Paniza - 2012-01-04

    The problem occurs only when the @EntityValidor is applied to an element if a Cascade.REMOVE/ALL collection, and the reference name does not match with model name. That is, only in the next case:

    class Journal {

    ...

    @OneToMany\(mappedBy="theJournal",cascade=CascadeType.ALL\)  // with Cascade ALL
    Collection<JournalEntry> entries
    

    ...

    }

    class JournalEntry {

    @ManyToOne 
    Journal theJournal  // Note that the reference name is 'theJournal' and not just 'journal'
    

    ...

    }

     

Log in to post a comment.