# I want this Heroku-Connect model to be my app's custom user model. # That means, vendors registered in my Salesforce database should be able to login with their vendor_code__c as username class Vendor(hc_models.HerokuConnectModel): sf_object_name = 'Vendor__c'
vendor_code = hc_models.ExternalID(sf_field_name='Vendor_Code__c', unique= True, upsert=False) # this should be the username sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False) name = hc_models.Text(sf_field_name='Name', max_length=80) email = hc_models.Text(sf_field_name='Email__c', max_length=80) # I've tried to replicate the vendor model with multi-table inheritance, found here # https://django-heroku-connect.readthedocs.io/en/latest/models.html#multi-table-inheritance class vendoruser(Vendor): hc_model = models.OneToOneField(Vendor, on_delete=models.CASCADE, to_field= 'vendor_code', parent_link=True, db_constraint=False) # the idea is to extend the model from here. I do as in the example, but I get blocked right away with the following error """ salesforce.vendoruser: (heroku_connect.E006) salesforce.vendoruser.sf_object_name 'Vendor__c' clashes with another model. HINT: Make sure your 'sf_object_name' is correct. """ # I've also tried to use hc_models.OneToOneField or hc_models.ForeignKey but it's not supported # Any suggestion on how to work around this? -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f82f4834-8ca7-4378-bbad-7dabdbacba95%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

