0
I am 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 console.log comes correct.
In Insert, the field is going with a value nothing to see type always the same: 1864385090. I suspect you are trying to insert the whole object and not the value I want, the id.
In html I cannot do by example ng-model="cad.cadGeral.chaveCadastro.id"
error does not recognize id.
How do I from this keyCheck object only get the id in html and not the whole object?
Where JAVA enters this problem?
– user28595
public class cadGeral extends Identityobject { private Static final long serialVersionUID = 1L; @Column(name = "fk_register") public Registration key;
– user10111111
here I treat the table in java
– user10111111
Just a hint. Java classes are always started with uppercase letters!
– Edjane
Tip, try to format the code when adding, do not paste the question anyway, it disturbs the reading of the question and who will help you. Always remember to make life easier for those who will help you by providing a clear and well-formatted question, so the chance to get answers.
– user28595