Hi,
I cannot figure out how to exclude some fields for either validation or serialization. I tried to set dropExtraFields but it didn't work.
1) when I try to add a new user it leads to a VALIDATION_E because ID field is missing. ID gets generated by a database trigger on insert.
2) I have a field pwd which is mandatory in the entity. It holds encripted password. I don't want this field to send over at all.
I defined a new field in the ds.xml password which acts as plain text password field.
In DMI I used to convert password field into pwd.
What would be the best way to achieve this?
3)
Another field I don't want to send across is byte[] which can be large. It holds *.PDF files.
4) Ideally, I'd like to send over and validate only fields which I explicitly defined in ds.xml The same way it works for DMI data sources.
I set some fields just before add or update. for example I set who made a last change on the object. Those fields are mandatory on the entity but they shouldn't be set on the GUI.
best regards,
Zdary
I cannot figure out how to exclude some fields for either validation or serialization. I tried to set dropExtraFields but it didn't work.
Code:
<DataSource ID="usersDS" serverConstructor="com.isomorphic.jpa.JPA2DataSource" schemaBean="cz.bcom.smartrise.server.persistence.hibernate.UsrUsers" dropExtraFields="true"> <fields>
Code:
@Id @GeneratedValue(strategy = IDENTITY) @Column(name = "ID", unique = true, nullable = false) public Integer getId() { return this.id; }
I defined a new field in the ds.xml password which acts as plain text password field.
In DMI I used to convert password field into pwd.
What would be the best way to achieve this?
3)
Another field I don't want to send across is byte[] which can be large. It holds *.PDF files.
4) Ideally, I'd like to send over and validate only fields which I explicitly defined in ds.xml The same way it works for DMI data sources.
I set some fields just before add or update. for example I set who made a last change on the object. Those fields are mandatory on the entity but they shouldn't be set on the GUI.
best regards,
Zdary
Comment