Table with self-relationship

0

Good morning.

I have a table that uses self-relationship, it happens that not all the names entered have a parent, but I can not create a name with parent null, there is not the first one that was created, as in the example below.

Example:

id                                         name               pai

02016356-ED97-439B-8E78-4200547BD5AC      Presidente          null
239A0DB8-4282-45E5-B5AE-5A2702576E49      Diretoria Geral    02016356-ED97-439B-8E78-4200547BD5AC

Form Code

<form:select path="parent.id">
    <form:options items="${parents}" itemValue="id" itemLabel="name" />
</form:select>
    
asked by anonymous 26.03.2015 / 14:22

0 answers