Lists and orderColumn

21 views
Skip to first unread message

Ic80

unread,
Jun 8, 2015, 6:16:23 AM6/8/15
to sculptor...@googlegroups.com
Hi,
I'm trying to define a list of entities inside another entity, and I want the order of the entities to be stored, so I defined the model like this:


Entity DocumentCategory {
       scaffold
       String name
       String defaultTipo nullable
       boolean predefined
       - @DocumentCategory parent nullable cascade="persist,merge"
       - Set<@DocumentCategory> children
       - List<@DocumentTemplate> templates <-> category orderColumn
      }


Entity DocumentTemplate {
   scaffold
   databaseTable="DOCUMENTS_TEMPLATE"
   String tipo
          longblob content
          String name
          boolean mergeSource
   CDSType cdsType nullable
   - @DocumentCategory category <-> templates cascade="persist"
   - Set<@CDSIdentity> allowedCDS cascade="all-delete-orphan" inverse
}

I thought that by adding orderColumn a column would be added for storing the index, but the resulting hibernate mapping is the same as before adding orderColumn, is there some other condition I'm missing to enable this feature? I've tried to give the order column an explicit name but I got the same result.
I'm using sculptor 3.1.0 with JPA2/Hibernate4.
Thanks.



Torsten Juergeleit

unread,
Jun 9, 2015, 5:57:18 PM6/9/15
to sculptor...@googlegroups.com, santo....@gmail.com


You found a bug (issue #178). Thanks for spotting this.

/Torsten
Reply all
Reply to author
Forward
0 new messages