Hi
If I understand you correctly, you can use the db_column option for any
field to specify the name of a column in the database. For example
othertable = models.ManyToManyField('OtherTable',db_column='otid')
Instead of the database column name defaulting to "othertable_id", it will
be "otid"
There is a Model field reference page at
https://docs.djangoproject.com/en/1.5/ref/models/fields
describes this and other field options
On Fri, 2 Aug 2013 16:34:34 -0700 (PDT)
Akshay Kapoor <akshay.anilkapoor@gmail.com> wrote:
> Hi,
>
> I am building a UI for java application in django. I want to create Java
> tables according to the ones created by JPA. For this when i use the
> ManyToMany Field, the newly created intermediate table has column names
> which are not matching the ones with the JPA.
>
> Is there any way that i can give custom names to the columns in the
> table So, as to not get the Missing column error in Java.
>
> Any help would be really appreciated.
>
--
Drew Ferguson
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment