Subsonic error: Unknown column 't0.CartQuantity' in 'field list' - subsonic3

I added a custom property to a generated class from the database using a partial class and for some reason everytime I query my table it tries to look for the custom property as a column in the database and that's when I get this error, is there a way to tell subsonic that my property is not a column in the database?
I'm using Mysql by the way.

I used the SubsonicIgnore attribute on my property and it fixed the issue.

Related

column "xx_xx" can only be updated to DEFAULT - DJANGO

Im trying to update some values (via django) at a table on Postgres that contains a Generated column.
This is the error im getting:
column "xx_xx" can only be updated to DEFAULT
See complete error here
You cannot edit generated column in a way other columns are saved/updated
As PostgreSQL documentation states
A generated column cannot be written to directly. In INSERT or UPDATE commands, a value cannot be specified for a generated column,
but the keyword DEFAULT may be specified.

Error while updating a record in APEX screen

while updating a record using MRU its failing with below error.
1 error has occurred
Current version of data in database has changed since user initiated update process. current row version identifier = "C5F3645B026AA5646C00DC7B631C4D19" application row version identifier = "6A9323B62F641015FA4601421DFB03DE" (Row 1)
This is strange because I do not see any change in the data at backend.
Any help will be highly appreciated.
Thanks.
AJ
If you're using a tabular form, check your query, then check the item. The item must match with the correct column in a database that is updatable.
Make sure that your column aliases match your column names (for updateable columns).
I had the same problem, the problem in my case that detail table has composite primary key,
so in application > column > Primary KeyPrimary Key
property must all primary key field enable , not only one field.

django-oscar validation error: attribute cannot be blank

Im using the latest django-oscar from the master branch.
I've been tryin to understand how to use oscar, please help me with the problem below.
Using the admin page, first, I add the following Product Attribute
Product class: Base Card
Name: Card Type
Type: Option
Option Group: 'Card Type'
Required: checked
Then I tried adding a new Product with the product class Base Card. Under the Product Attribute Values section, I chose Card Type for the attribute, but no matter what values I inserted under e.g Value Option, text or Integer, I keep receiving the validation error below. Any idea why?
ValidationError at /admin/catalogue/product/add/
[u'cardtype attribute cannot be blank']
I'm afraid I'm not able to recreate your issue.
Did you definitely add options to your Card Type option group?

Doctrine ORM error : Unknown column type varchar requested

Ok, so i just assigned a new project which uses Doctrine and Zend. This is my first time using Doctrine, and i came upon an error for which google didn't came up with any answer.
I added a new field (VARCHAR 17) to a table, added getter/setter functions in the Entity for that table, then ran orm:generate-proxies.
All good, except now i am getting this error when trying to save anything: Unknown column type varchar requested.
Any thoughts?
The problem is, that doctrine annotation doesn't know about the underlying database. So what you have to do is mark your field as type string with length of 17 in your case:
/**
* mySuperField
* \ORM\Column(name="mySuperField", type="string", length=17)
*/
$mySuperField;
For reference about how to map entity properties see also Doctrine Basic Mapping
At first learn about doctrine commands
orm:generate-entities to write getter/setter functions in the Entity files,
orm:schema-tool:update to update db tables,
you should not do this work manually, just write yaml/xml/php schema and run them.
If you use Bisna library to integrate doctrine2 with zf, there must be "adapterClass" and "mappingDirs[]" options in application.ini file to describe where schema files are.
Use type "string" instead of varchar in entity and schema files.
I prefer yaml schemas:
username:
type: string
length: 17

Django: Many-to-many through a table with (only) compound key

I have a legacy database with a table storing a many-to-many relationship, but without a single primary key column. Is there any way to convince Django to use it anyway?
Schematically:
Product 1<---->* Labeling *<---->1 Label
The Labeling table uses (product_id,label_id) as a compound primary key, and I don't see any way to inform Django about this. (Just using through gives me Unknown column 'labeling.id' in 'field list'.)
Do I need to fall back to custom SQL? Or am I missing something?
hope this helps you,
http://docs.djangoproject.com/en/dev/ref/models/options/#unique-together
http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.db_index
If you add a unique_together to the model for the many-to-many table, Django will use those columns instead of expecting a primary key called id.