hibernate - grails hasOne but does not belong to -


I am working on a project and there is a invoice domain class that currently contains < Code> hason = [billing address: address] When I try to launch my server, I receive the following error:

  has property [invoice. Billing Address] is not bidirectional. Specify the relationship on the other side!  

I do not want to allocate the other side of the relationship ... the invoices have a billing address but the addresses are not under the invoice.

It looks like you have a hasOne :

  class invoice {// Other property address needs a common collaboration instead of address billing address}  

A hasOne mechanism change the representation of the database to a database with a conventional A way of With a traditional address billing address , you have a billing_address_id column in the invoice table, while hasOne Instead of being represented by a foreign key in the address table - this permission only allows for invoice each address , which is why Association should be bidirectional.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -