Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Additional Database Inserts 7 years 8 months ago #19134

  • mrgreg
  • mrgreg's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 67
  • Thank you received: 6
Hello Team JEM,
I've managed to get pretty far in my customizations (venue and event categories), but this one point is proving elusive. In fact, being stuck here almost seems that I am overlooking something simple.

Upon creation of a new venue or event in JEM I also need to create the corresponding venueid and eventid in two separate tables (outside of JEM).

So my question is, where is the best place to do this, and (briefly) how? ;)

TYI for considering this off path question.
Regards,
Greg

Noob end-user, just sorting it out...
Joomla! 3.4.1
JEM Component: 2.1.3
JEM Component: 2.1.4
JEM Component: 3.0.7

Please Log in or Create an account to join the conversation.

Additional Database Inserts 7 years 8 months ago #19135

  • Hoffi
  • Hoffi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 2279
  • Thank you received: 449
Hi Greg,

because the id of new records is creating by the dbms while saving you have to "wait" until the new records are stored. One location would be the function postSaveHook() in controller.

Another idea could be to create a new content plugin with functions onContentAfterSave() and maybe onContentAfterDelete() or onContentBeforeDelete() for cleanup. This way you will be more "loose coupled" so you have to merge some lines fewer each time we provide a new JEM release. B)
Pessimists are optimists with experience!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.376 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......