Saving extra data with an order in Magento

After a lot of trial and error – a lot of error – I think I have it now. To begin with the sales_flat_order_grid is updated in Mage_Sales_Model_Mysql4_Order_Abstract::updateGridRecords(), by following the trail I worked out it inspects both the “main” table (sales_flat_order) and the main table + “_grid” (sales_flat_order_grid), takes the intersect of their columns … Read more

SQL Server: How to permission schemas?

I fear that either your description or your conception of Ownership Chaining is unclear, so let me start with that: “Ownership Chaining” simply refers to that fact that when executing a Stored Procedure (or View) on SQL Server, the currently executing batch temporarily acquires the rights/permissions of the sProc’s Owner (or the sProc’s schema’s Owner) … Read more

Designing a SQL schema for a combination of many-to-many relationship (variations of products)

Applying normalization to your problem, the solution is as given. Run and see it on SQL Fiddle. CREATE TABLE products ( product_id int AUTO_INCREMENT PRIMARY KEY, name varchar(20), description varchar(30) ); INSERT INTO products (name, description) VALUES (‘Rug’, ‘A cool rug’ ), (‘Cup’, ‘A coffee cup’); — ======================================== CREATE TABLE variants ( variant_id int AUTO_INCREMENT … Read more

Log4Net “Could not find schema information” messages

You can bind in a schema to the log4net element. There are a few floating around, most do not fully provide for the various options available. I created the following xsd to provide as much verification as possible: http://csharptest.net/downloads/schema/log4net.xsd You can bind it into the xml easily by modifying the log4net element: <log4net xsi:noNamespaceSchemaLocation=”http://csharptest.net/downloads/schema/log4net.xsd” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>

How do I move a table into a schema in T-SQL

ALTER SCHEMA TargetSchema TRANSFER SourceSchema.TableName; If you want to move all tables into a new schema, you can use the undocumented (and to be deprecated at some point, but unlikely!) sp_MSforeachtable stored procedure: exec sp_MSforeachtable “ALTER SCHEMA TargetSchema TRANSFER ?” Ref.: ALTER SCHEMA SQL 2008: How do I change db schema to dbo

JPA using multiple database schemas

I had the same problem I solved that with a persistence.xml in which I refer to the needed orm.xml files within I declared the db shema <persistence xmlns=”http://java.sun.com/xml/ns/persistence” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd” version=”2.0″ > <persistence-unit name=”schemaOne”> . . . <mapping-file>ormOne.xml</mapping-file> . . . </persistence-unit> <persistence-unit name=”schemaTwo”> . . . <mapping-file>ormTwo.xml</mapping-file> . . . </persistence-unit> </persistence> now … Read more