Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Preview: DataObjectManager module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
Go to End
Author Topic: 58257 Views
  • henning.blunck
    Avatar
    Community Member
    6 Posts

    Re: Preview: DataObjectManager module Link to this post

    Hey,
    seems like, at the moment, the dataobjectmanager is the best (and sometimes only) way to work properly on many_many-Relationships. My question (and I hope it is not that dumb that anyone notices, I'm a relative newbee) is:
    Does the DataObjectManager also works with many_many_extraFields? How can these additional attributes to the connecting table be displayed/altered/etc. And despite from that: Is there an other chance to edit these fields? I've found this feature of extraFields nice and important but very few documented.

    Bye for now,

    Henning

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: DataObjectManager module Link to this post

    @sunnyboy -- I've attached a working example of a Resume upload form that is in use on a production site with the latest SWFUpload module. Let me know if there's anything that needs to be updated in the docs.

    @amir -- I like the idea. I'll add a $canUpload parameter.

    @henning - Can you explain what you mean by extraFields? Sounds interesting. Make sure you're using a ManyManyDataObjectManager for those relations.

    Attached Files
  • henning.blunck
    Avatar
    Community Member
    6 Posts

    Re: Preview: DataObjectManager module Link to this post

    Hey,

    @cheese: ok, if YOU didn't know extraFields by now, than it seems not to have such big popularity right now.

    Formal speeching I refered to:
    http://api.silverstripe.com/sapphire/core/DataObject.html#$many_many_extraFields
    One of the very few (like 2-3) examples I found on the internet was the first post in this discussion:
    http://groups.google.com/group/silverstripe-dev/browse_thread/thread/865b4b337c230b1c/f39328a56fc4afb4

    I gave it a try: It basicly works very well. The relation table gets (beside an ID and fields to save the IDs of the two involved Records) further columns (in the above mentioned example, the table saving the Posts<->Categories Relationship gets a further column named "PrimeCategory" of type boolean).

    In the meanwhile, I've found out, that managing this extraFields with manymanycomplextable fields is not yet possible (refering to the "ToDo" remark on http://doc.silverstripe.com/doku.php?id=manymanycomplextablefield)

    Greets from Mannheim (Germany),

    Henning

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: DataObjectManager module Link to this post

    Perfect! I've been looking for that functionality! I'll definitely look into it and hopefully get ManyManyDataObjectManager to support it. That's great news.

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: Preview: DataObjectManager module Link to this post

    UncleCheese> The fix was to use the member method ComplexTableField::getParentIDName() to generate this fieldname correctly.

    This fix helps a lot! Thank you!

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: Preview: DataObjectManager module Link to this post

    Any chance we could create a forum folder for threads re Uncle Cheese's modules? This thread is so long that it is hard to quickly scan it to see if a particular topic/bug was already discussed. The Event Calendar Module thread is also very long.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: DataObjectManager module Link to this post

    Yeah, i've been saying that for a while. Who do we need to talk to? SS Admins? Hello?!

  • rndmerle
    Avatar
    Community Member
    24 Posts

    Re: Preview: DataObjectManager module Link to this post

    Hi.

    Just to say I'm using ImageDataObjectManager with PNG images without any trouble.
    I put $limitFileTypes = array ('jpg', 'png'); into ImageDataObjectManager.php

    Be safe.

    58257 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.