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

TOPIC:

Can nested queries work with Cook's ORM 15 Jun 2017 17:07 #15217

  • vlemos
  • vlemos's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 295
  • Thank you received: 41
Hello Admin

How can I implement nested selects with ORM or return a fixed value as a field?
Ex: 'status' = `online`;

Thanks
vlemos

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

Can nested queries work with Cook's ORM 24 Jun 2017 09:41 #15228

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
If you design the Item layout, you could find the appropriate ORM query to display the value in the Item Model.

If you want to add / complement or overwrite queries with ORM, you need to go in the Project Configuration / SQL Queries.
Then choose 'Explosed'.
Then you could add your specific queries with ORM or standard (AddJoin, AddSelect, still works too in Explosed Mode...)
The following user(s) said Thank You: vlemos

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

Last edit: by liubov.

Can nested queries work with Cook's ORM 25 Jun 2017 05:49 #15229

  • vlemos
  • vlemos's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 295
  • Thank you received: 41
Yes, I did it with:
//SELECT
$this->addSelect('......');
even without Exploded I think
So thanks again my friend!

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

Can nested queries work with Cook's ORM 25 Jun 2017 10:46 #15230

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
And what's happenned ? not working fine ?
Give me an example of what you want do to, maybe i can help you ...
The following user(s) said Thank You: vlemos

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

Can nested queries work with Cook's ORM 26 Jun 2017 21:00 #15231

  • vlemos
  • vlemos's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 295
  • Thank you received: 41
Hey liubov, It is interesting how things happen at times. After working to develop the select query I found a better way which is more consistent and reusable in my model. But it wasn't a bad learning experience either. Thanks again v

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

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

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started