Openbravo Forum End of Life Notice

Dear Openbravo Forum User,

Because of continued very low usage we decided to stop the forums on 31st of August 2017

In case of questions: webmaster "at" openbravo.com

Compisitions

<<

Darren Jones

Posts: 10

Joined: Thu Aug 19, 2010 11:52 am

Post Sun Nov 14, 2010 2:26 am

Compisitions

Hi there,


I read the tutuorial on how to create a compisition, love the fact that its built in and will come in very handy, but i am getting an error in relation to a forieng key, when i first created the database when opening openpos it gave me an error creating the database, not sure if this is part of the issue.


 


com.openbravo.basic.BasicException:

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`openpos`.`products`, CONSTRAINT `products_ibfk_5` FOREIGN KEY (`CATEGORY`) REFERENCES `categories` (`ID`))



com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:

Cannot add or update a child row: a foreign key constraint fails (`openpos`.`products`, CONSTRAINT `products_ibfk_5` FOREIGN KEY (`CATEGORY`) REFERENCES `categories` (`ID`))


 


i dont want to go playing around with the database incase i break something, thought i would ask here if anyone else if having an issue like i am.


 


cheers,


 


Darren

<<

Detlef Jenett

Posts: 14

Joined: Wed Oct 20, 2010 5:14 pm

Post Sun Nov 14, 2010 10:27 am

RE:Compisitions

Could you please give the error when initially creating the DB?


I remember having an error also (at initial create DB) and fixed it. But could be a different thing. Compositions are working fine here.

<<

Darren Jones

Posts: 10

Joined: Thu Aug 19, 2010 11:52 am

Post Mon Nov 15, 2010 2:58 am

RE:Compisitions

it was saying that it cannot create the sub_cat tables in the database, i tried to create the database again, and i got the message about not being able to create the tables, i never saw that message the first time, everything seems to work apart from that. Do you have a dump of the tables structure so i could add these tables?



<<

Detlef Jenett

Posts: 14

Joined: Wed Oct 20, 2010 5:14 pm

Post Mon Nov 15, 2010 9:55 am

RE:Compisitions

Attached please find the mySQL script. There are allready some tax included you need to modify to your needs.


I use it under Linux (Ubuntu Lucid) and Windows XP.

Attachments
mysql-create.sql.zip
(974 Bytes) Downloaded 120 times
<<

Darren Jones

Posts: 10

Joined: Thu Aug 19, 2010 11:52 am

Post Wed Dec 15, 2010 4:53 am

RE:Compisitions

Hi there,


this is turning out to be alot harder than i first thought, i've finally been able to create the database, then when i configure openpos to use it, it comes up saying its "a working database cannot be detected" would you like to create one, if you click no, the config panel comes up, if you say yes, then it comes up with lots of errors,  i'm finding this impossible to get going..... i have been using it without compisitions, but i REALLY want to get this going as i need to sell combo's in the store..


any help at all is much appreciated.


 


Darren

<<

Ryan Reynolds

Posts: 44

Joined: Sat May 15, 2010 7:33 am

Post Fri Jan 28, 2011 9:03 am

RE:Compisitions

Hi Guys


I am getting the same error as darrenj and was is there a simple fix for this.


Thanks Ryan

<<

Helder Teixeira

Posts: 55

Joined: Sat Feb 06, 2010 6:23 pm

Post Fri Jan 28, 2011 2:55 pm

RE:Compisitions

Hi,

Compositions is working fine in here since version 2.30.2.

No errors on the database scripts unless you're using the old version or derby that just fails on the epm module.

If you have any questions please post.



Take care.
<<

Ryan Reynolds

Posts: 44

Joined: Sat May 15, 2010 7:33 am

Post Fri Jan 28, 2011 3:14 pm

RE:Compisitions


Hi Corvisier


This is the error i get when i try and save a composition item.


 


com.openbravo.basic.BasicException:


com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`mysql`.`products`, CONSTRAINT `PRODUCTS_FK_1` FOREIGN KEY (`CATEGORY`) REFERENCES `categories` (`ID`))


 


com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:


Cannot add or update a child row: a foreign key constraint fails (`mysql`.`products`, CONSTRAINT `PRODUCTS_FK_1` FOREIGN KEY (`CATEGORY`) REFERENCES `categories` (`ID`))


Thanks


Ryan

<<

Helder Teixeira

Posts: 55

Joined: Sat Feb 06, 2010 6:23 pm

Post Fri Jan 28, 2011 6:14 pm

RE:Compisitions

Hi,



Did you change the name or deleted the category 'Compositions'?

Because the Category ID is hardcoded as 0 so that could be the issue.

Could you please check the ID of the category compositions?



Take care



Post Edited by Corvisier at 28/01/2011 17:15
<<

Ryan Reynolds

Posts: 44

Joined: Sat May 15, 2010 7:33 am

Post Fri Jan 28, 2011 6:25 pm

RE:Compisitions

Yes I did i have realised this but now it wont let me change it back.
Next

Return to Open discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Website Terms


Designed by ST Software for PTF.