Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Groovy Webservice
    text
    copied!<p>Still no answer...anyone have something better? Okay complex 2 part question here. I have an Android registration page that gathers information customer name, address, email, phone,... When they click submit I want to send that data to a webservice, that is using Groovy, grails and Hibernate, I am creating. So my First question how do I send that data to my webservice, can some give an example? </p> <p>Once I send that data on the Webservice, how do I make a complex insert into 2 tables from my Groovy scripts, where customer table has id of address table ? These are legacy tables so the standard domains don't work since id column name is not the standard "id". and the relationship is one customer row per address_book row.</p> <p>Customer table has id, name, email, username, password and address_id Address table has id, address, city state, zip ...</p> <p>here are my domains for addressbook and customers:</p> <pre><code>class AddressBook { String entryStreetAddress String entryStreetAddress2 String entryPostcode String entryCity Integer entryState Integer entryCountryId static mapping = { id column: "address_book_id" version false } } </code></pre> <p>Heres the legacy customers table notice customerDefaultAddressId is the address_book_id in previous domain:</p> <pre><code>class Customers { String customersFirstname String customersMname String customersLastname String customersEmailAddress Integer customersDefaultAddressId //address id joins AddressBook to Customers String customersTelephone String customersUsername String customersPassword static mapping = { id column: "customers_id" version false } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload