About ValueObjectType and Extended types and Collection based objects

2022-10-23 Thread Riccardo De Menna
same List object. One based on a specific column of the database? Thank you in advance for any support, Riccardo De Menna

Re: About ValueObjectType and Extended types and Collection based objects

2022-10-24 Thread Riccardo De Menna
support or the ability to point from the model to a specific factory or converter. This would allow to just pick different schemes without having to hide them behind empty classes. Regards, Riccardo De Menna > On 24 Oct 2022, at 09:19, Andrus Adamchik wrote: > > Hi Riccardo, &g

How to deal with localized content in the db

2023-11-01 Thread Riccardo De Menna
from name_en, email_en, address_en and such. I’m sure this must be something people have dealt with before. Regards, Riccardo De Menna

Question about optionality in one-to-one relationships

2024-01-09 Thread Riccardo De Menna
Hi, Can someone help me understand something? I’m trying to model a one-to-one relationship between two entities but I can’t seem to get the relationship to be optional. In my specific case I need to model an entity representing shipments with a postal service. Each shipment needs to have a nu

Re: Question about optionality in one-to-one relationships

2024-01-09 Thread Riccardo De Menna
IONSHIPS = List.of( TO_SHIP_PROPERTY ); Riccardo De Menna > On 10 Jan 2024, at 01:20, Michael Gentry wrote: > > Hi Riccardo, > > I may have completely misunderstood your intention, but here is my first > cut for a model: > > cayenne-o2o.xml: > > http://cayenne.apache.org/s

Re: Question about optionality in one-to-one relationships

2024-01-10 Thread Riccardo De Menna
confirm that if I forcefully ignore the fact that the relationship isMandatory and skip all my validation code based on that flag, the object context DOES commit it without complaint. Riccardo > > On Wed, Jan 10, 2024 at 10:10 AM Riccardo De Menna > wrote: > >> Hi Michael

Re: Question about optionality in one-to-one relationships

2024-01-10 Thread Riccardo De Menna
pending on it, the ObjectContext does not seem to complain about it and does commit the save. I assume it’s just the flag being marked as mandatory for some other side condition but I still don’t know what to use in the template as a reliable replacement. Riccardo > > mrg > >

Re: Question about optionality in one-to-one relationships

2024-01-10 Thread Riccardo De Menna
gt;> >> You could also use validateForInsert() I think, but you should also maybe >> do a validateForUpdate() if you go down that path. >> >> mrg >> >> >> On Wed, Jan 10, 2024 at 6:50 AM Riccardo De Menna >> wrote: >> >>> Hi Mic

Re: Question about optionality in one-to-one relationships

2024-01-11 Thread Riccardo De Menna
mandatory by design. Wouldn’t it be more appropriate to have a flag in the modeler with which to mark relationships as mandatory for these specific cases? Is there an easy workaround? Regards, Riccardo > On 11 Jan 2024, at 00:02, Riccardo De Menna wrote: > > Hi Michael, > > I’

Re: Question about optionality in one-to-one relationships

2024-01-11 Thread Riccardo De Menna
Hi Nikita, I stumbled upon a discussion thread in which you advertised a pull request to allow the use of metadataUtils via cgen to access comments. Can you tell me how to use it? Works with modeler as well? Thank you in advance, Riccardo > On 11 Jan 2024, at 09:22, Riccardo De Menna wr

Re: Question about optionality in one-to-one relationships

2024-01-11 Thread Riccardo De Menna
gt; underlying db relationships. You could probably use something similar to it > in your template, though it could be a bit challenging to reproduce in full. > > [1] > https://github.com/apache/cayenne/blob/master/cayenne/src/main/java/org/apache/cayenne/BaseDataObject.java#L565-L591

@size in ObjectSelect.orderBy()

2024-07-27 Thread Riccardo De Menna
Can I use the @size keyword to sort a ToMany relationship in the backend with ObjectSelect.orderBy() ? I’m getting: java.lang.IllegalStateException: Unable to resolve path: compositions (unknown '@size' component) at org.apache.cayenne.access.translator.select.ObjPathProcessor.processNo

Re: @size in ObjectSelect.orderBy()

2024-07-27 Thread Riccardo De Menna
n Cayenne. > > Andrus > >> On Jul 27, 2024, at 2:38 PM, Riccardo De Menna wrote: >> >> Can I use the @size keyword to sort a ToMany relationship in the backend with >> ObjectSelect.orderBy() ? >> >> I’m getting: >> >>

Is there a way to use EnumSet as custom data type?

2025-04-05 Thread Riccardo De Menna
confused). At the moment I’m just extending a HashSet> as a workaround but every time I see that I feel guilty not being able to use the ‘proper’ set collection for enums. Thank you, Riccardo De Menna

Re: Is there a way to use EnumSet as custom data type?

2025-04-14 Thread Riccardo De Menna
ould account for the Enum type > } > > EnumSet fromString(String value) { > } > } > > 3. and finally register factory with the runtime: > > ServerModule.contributeTypeFactories(binder) >.add(new EnumSetFactory()) > > Hope this helps! > > On S

Can I populate the Java Type popup in the Modeller with my custom types?

2025-04-14 Thread Riccardo De Menna
Hi, Is there a way to show my custom extended types in the popup for the Java Type column in the modeller? Typing the full package name + class every time is error prone and slow. I end up doing it on the .xml model but the GUI would make it easier. regards, Riccardo