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

TOPIC:

Foreign key problem on form 23 Aug 2012 22:54 #3273

  • dyvel
  • dyvel's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 200
  • Thank you received: 11
I have a strange problem.
I have created a table structure like this:


When I go to pages and add Keyword and Sub keyword to my collection, it works as expected:


But when I try to add the exact same field to my item page I get this:


Also Item page wont let me add both Keyword and Sub keyword, but only one of them, while collection page has no problem. I find this behavior rather strange. I'm I missing something?

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

Last edit: by dyvel.

Foreign key problem on form 24 Aug 2012 08:04 #3280

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Seems you dragged the Table ID, not the sub level field.
Can you confirm that in your fly you dropped you 'Keyword' field, behind the Keyword table ?
I mean, even if it is 2 or 3 levels deep, try to drop the last field, not the Table node.

Is there a real issue for you ?
Coding is now a piece of cake

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

Foreign key problem on form 24 Aug 2012 08:09 #3281

  • dyvel
  • dyvel's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 200
  • Thank you received: 11
I dragged the same keyword


And currently it's in issue yes, as it means I cannot do what I would like it to do :S
I don't understand why it's no problem in the collection, but only on the item page... ???

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

Last edit: by dyvel.

Foreign key problem on form 24 Aug 2012 08:11 #3282

  • dyvel
  • dyvel's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 200
  • Thank you received: 11
But that said, I must also say I'm VERY IMPRESSED with Cook - it's really powerful and I can't wait to see version 2.0

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

Foreign key problem on form 10 Sep 2012 18:10 #3486

  • dyvel
  • dyvel's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 200
  • Thank you received: 11
I still have this problem in V2.0 :(

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

Foreign key problem on form 10 Sep 2012 21:52 #3495

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
It is not an issue.

You are in a form.

Let me explain you why the form do not accept sub levels keys :

When submit a form, the datas are stored in a table row. Simple to understand.
This row is identified with a number (id or cid) sent to identifiate the item. can be 0 when you create it.

What happen if you have a category for example ?
A category field if used to link (FK) to a category item. This is a foreing key in a form. It works.

But what happens if you attempt to modify in the same form, the label of the category ?
It will modify this category label, used by others items.

It is not structurally correct. You can never do that.
If you have a 1:1 link, you can do that because you are sure that the second level field will never be used by another item. So you can have a single form that treats datas on two different tables (or more), but as I said before, only with 1:1 links.

So, now what ?
Cook do not handle 1:1 links, neither N:1, or N:N
The road is long, but I am sure you will face a very nice case of study to start understanding your component.
Coding is now a piece of cake

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

Foreign key problem on form 10 Sep 2012 21:59 #3496

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I'd like to add ...

When you'll be initiated in the source code and understand the new structure, you will be amazed how fast you can develop.

Every time you understand a little bit more your component, every time it becomes easier for the future.

Joomla is the future. The version 3.0 is really good and seems to become really professional.
Learn this 2.0 structure of your component because it is very close to the long term structure. Joomla 3.0 didn't changed that much for the point of view of the MVC structure.

You can fly on this technology for at least 5 years without problem. Joomla is sooo good.
Coding is now a piece of cake

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

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

Just wanted to congratulate you on the J-Cook website / web development tool. In a couple of visits I've had a play around with Cook and have to say I think it is fantastic.  I've played with a number of component builders in the past and yours is certainly looking like the best so far. I'd also like to help you spread the word - I'm really surprised more people aren't excited about this tool. Good luck with the project.
Dean

Get Started