Quote from: Bruno17 at Oct 27, 2015, 05:27 PMregarding images in DB as BLOB or as files, I would prefer files in most situations.
Google for 'images BLOB in table good practice' or something like that.
You will find different Opinions on that topic.
Can you explain a bit about your table, which field is what for?
Create your own package and do not use the doodles package for your own one.
And its allways a good idea to have the Primary-field-name just id in all tables.
Then use xPDOSimpleObject without defining the id-field in the schema. XPDO does it for you then.
Hi Bruno17
Ok the table structure Im using is (one to many) and not many to many becuase I dont want multiple rehabcentres to be able to access the same image:
table rehabcentres
id INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id),
doc_id INT(4), NOT NULL, (this will connect to a document (page) that exists as an a href link
locations TEXT, (this is a csv of regional locations)
intro_text TEXT (a small description of the centre)
table images
id INT(11) NOT NULL AUTO_INCREMENT,
rehabcentres_id INT(11) NOT NULL,
image VARCHAR(255) NOT NULL, (this is to hold the url of the image)
PRIMARY KEY (id),
FOREIGN KEY (rehabcentres_id) references rehabcentres(id) ON DELETE CASCADE