Insert in table - strange value

0

I'm trying to insert a value into a table from a select option.

html:

<select class="form-control" name="chaveCadastro" ng-options="cadastro.cadastroId for cadastro in (cadastro | orderBy:'id' | filter:{active:true}) track by cadastro.id" ng-model="cad.cadGeral.chaveCadastro"  id="cadastro">
</select>

angular:

cadGeral = result.data.value;

console.log(cad.cadGeral.chaveCadastro.id);

Java:

public class cadGeral extends IdentityObject { 

    private static final long serialVersionUID = 1L; 
    @Column(name = "fk_cadastro") 
    public Cadastro chaveCadastro;

In the console.log it comes correct.

In the insert, the field is going to have a value of nothing to see type always the same: 1864385090. I suspect that you are trying to insert the whole object and not the value that I want, id

In html I can not seem to do it for a while ng-model="cad.cadGeral.chaveCadastro.id" which gives error does not recognize id.

How do I get from this object KeyCatch only get the id in the html and not the whole object?

    
asked by anonymous 25.01.2018 / 11:42

0 answers