t; > return "update EO_PK_TABLE SET PK = PK+1 where NAME = '" + entName + "'";
> > }
> >
> > @Override
> > protected String pkSelectString(String entName) {
> > return "SELECT PK FROM eo_pk_table WHERE NAME = '" + entName + "
7.0.0.1:3306/sms?useSSL=false&serverTimezone=UTC")
> .driver("com.mysql.cj.jdbc.Driver")
> .userName("sms")
> .password("").build())
> .build();
>
>
>
>
--
Best regards,
Nikita Timofeev
kes all the
> ExtendedTypeFactories with it. If it passed the string instead of the class
> the factory would have the option of processing the type between < > and
> then strip it.
>
> Is it difficult to implement? Am I being naive?
>
> Thank you,
> Ricc
enums.
>
> Thank you,
> Riccardo De Menna
--
Best regards,
Nikita Timofeev
traint checks :).
>
> Cheers,
> - hugi
>
>
>
> > On 14 Aug 2024, at 11:27, Nikita Timofeev
> wrote:
> >
> > In this case it seems like a true cycle, the Person entity has two
> > relationships to self. And that particular case Cayenne didn't handle
>
/family/MainWithAddedBackReference.java
>
> Any thoughts?
>
> Cheers,
> - hugi
>
>
>
> > On 12 Aug 2024, at 13:52, Nikita Timofeev
> wrote:
> >
> > Hi Hugi,
> >
> > Thanks for the perfect example, that's always my main problem.
> > I'v
(Oracle-style) instead of having Cayenne generate them, and lived
> with the performance penalty associated with that, but the problem came
> back with 4.2 despite that. Not reliably reproducible though, happens every
> now and then. Any thoughts?
> >>
> >> Thanks
> >> Maik
> >>
> >
>
>
--
Best regards,
Nikita Timofeev
is set to NO ACTION
>
> Now when I create / add a new relation commit the work and the delete the
> relation everythings of, but when I do the same again, create the same
> relation as before and delete it! A relation function returns a object C in
> transient state?
>
> regards
> Meex
>
--
Best regards,
Nikita Timofeev
quot;>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> >>>>>>> isMandatory="true"
> >>>>>>>> />
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> >>>>>>> isMandatory="true"
> >>>>>>>>>
> >>>>>>>> http://cayenne.apache.org/schema/10/info";
> >>>>>>> name=
> >>>>>>>> "comment" value="This ID is the same as SHIPMENT's ID."/>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> http://cayenne.apache.org/schema/10/info";
> >>>>>>> name=
> >>>>>>>> "comment" value="This is the shipment number."/>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> lock-type=
> >>>>>>>> "optimistic" dbEntityName="SHIPMENT"/>
> >>>>>>>> className="org.test.ShipmentNumber"
> >>>>>>>> lock-type="optimistic" dbEntityName="SHIPMENT_NUMBER">
> >>>>>>>> >>>>>>> db-attribute-path="NUM"/>
> >>>>>>>>
> >>>>>>>> >>>>>>> target="SHIPMENT_NUMBER"
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> >>>>> target="SHIPMENT"
> >>>>>>>> toDependentPK="true">
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> >>>>>>> target="ShipmentNumber"
> >>>>>>>> deleteRule="Cascade" db-relationship-path="toShipNum"/>
> >>>>>>>> >>>>> target="Shipment"
> >>>>>>>> deleteRule="Deny" db-relationship-path="toShip"/>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Copy/Paste these files somewhere, then try loading them up into
> your
> >>>>> 4.2
> >>>>>>>> Modeler and see if it is close.
> >>>>>>>>
> >>>>>>>> mrg
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Tue, Jan 9, 2024 at 9:54 AM Riccardo De Menna <
> deme...@tuorlo.net>
> >>>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> 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 number taken
> from a
> >>>>>>>>> range/group that is pre-assigned by the postal service.
> >>>>>>>>>
> >>>>>>>>> Thus I created a SHIPMENT_NUMBER entity with just an INTEGER
> >>>>> attribute
> >>>>>>> and
> >>>>>>>>> then used that attribute to build the relationship with the
> SHIPMENT
> >>>>>>>>> entity. Possibly with “To dep PK” as well.
> >>>>>>>>>
> >>>>>>>>> I want the relationship to be optional so that I can generate
> >>>>>>>>> SHIPMENT_NUMBER as many as I want and populate them with the
> numbers
> >>>>>>>>> assigned by the postal service and only later, when the real
> >>>>> SHIPMENT is
> >>>>>>>>> actually needed/created, link it with the number in a one-to-one
> >>>>>>> fashion.
> >>>>>>>>>
> >>>>>>>>> I’m not sure why, but my class generated content always shows the
> >>>>>>>>> relationship as mandatory.
> >>>>>>>>>
> >>>>>>>>> Coming from the WebObjects world, I'm used to a modeler that
> >>>>> explicitly
> >>>>>>>>> shows checkboxes for isMandatory on relationships like with the
> >>>>>>> attributes.
> >>>>>>>>> Here in Cayenne it seems that optionality is implicitly
> determined
> >>>>>>> based on
> >>>>>>>>> the design.
> >>>>>>>>>
> >>>>>>>>> Have I misunderstood something? Is my design flawed?
> >>>>>>>>>
> >>>>>>>>> Any tip is appreciated.
> >>>>>>>>>
> >>>>>>>>> Regards,
> >>>>>>>>> Riccardo
> >>>>>>>
> >>>>>>>
> >>>>>
> >>>>>
> >>
> >
>
>
--
Best regards,
Nikita Timofeev
e-assigned by the postal service.
> >>
> >> Thus I created a SHIPMENT_NUMBER entity with just an INTEGER attribute
> and
> >> then used that attribute to build the relationship with the SHIPMENT
> >> entity. Possibly with “To dep PK” as well.
> >>
> >> I want the relationship to be optional so that I can generate
> >> SHIPMENT_NUMBER as many as I want and populate them with the numbers
> >> assigned by the postal service and only later, when the real SHIPMENT is
> >> actually needed/created, link it with the number in a one-to-one
> fashion.
> >>
> >> I’m not sure why, but my class generated content always shows the
> >> relationship as mandatory.
> >>
> >> Coming from the WebObjects world, I'm used to a modeler that explicitly
> >> shows checkboxes for isMandatory on relationships like with the
> attributes.
> >> Here in Cayenne it seems that optionality is implicitly determined
> based on
> >> the design.
> >>
> >> Have I misunderstood something? Is my design flawed?
> >>
> >> Any tip is appreciated.
> >>
> >> Regards,
> >> Riccardo
>
>
--
Best regards,
Nikita Timofeev
gt; >
> > > I was going to write a lot of background, but I don't know if it would
> > help
> > > or just confuse the situation. 🤣
> > >
> > > The situation I have is in one specific situation, I'd like Cayenne to
> > > always add an attribute to the UPDATE/INSERT statements, not just if the
> > > value is changed. Can you think of any way to achieve that?
> > >
> > > Thanks,
> > >
> > > Lon
> >
> >
--
Best regards,
Nikita Timofeev
FERENCES
> `meals_items` (`id`))
>
>
> so cayenne tries to insert the meals_meals_items before the inserts of
> meals_items?
>
>
> sometimes it works, but then the deleting has problem, also first he trys
> to delete meals_meals_items then the fk has a problem?
>
>
> regards
>
> Meex
>
>
>
>
>
> When I log the JDBC statements I see
--
Best regards,
Nikita Timofeev
Also I've described exact cause of the problem in this issue
https://issues.apache.org/jira/browse/CAY-2801
On Thu, Mar 9, 2023 at 11:25 AM Nikita Timofeev
wrote:
>
> Hi!
>
> Thanks for the information and even more for the debugging you already did.
> There was a commit a b
> Cayenne from RC1 to RC2.
> This is was the result:
>
>
> 7bc235f92e2e61d3f4f04d3bebb65a1756d2e092 is the first bad commit
> commit 7bc235f92e2e61d3f4f04d3bebb65a1756d2e092
> Author: Nikita Timofeev
> Date: Mon Nov 21 12:59:45 2022 +0300
>
> CAY-2777 Reve
o do to make this
> >> work..but I have a bad memory. :)
> >>
> >> Also, I'm using the GraphBasedDbRowOpSorter, which is really required to
> >> do anything meaningful with Sybase and its lack of deferred constraints.
> >> idk if this could be related...but it's been an issue before.
> >>
> >> Thanks,
> >>
> >> Lon
> >>
>
--
Best regards,
Nikita Timofeev
SQLite JDBC driver not bringing over
> > the FK metadata during DB import. Again, this was years ago.
>
> It must have been a long while ago.
>
> If I use it from DBeaver, I do get all the foreign keys, so the JDBC
> driver has been fixed by now.
>
> Ali
--
Best regards,
Nikita Timofeev
llections$UnmodifiableMap.put(Collections.java:1459)
> > >>>
> > >>> at
> > org.apache.cayenne.query.BatchQueryRow.getValue(BatchQueryRow.java:80)
> > >>>
> > >>> at org.apache.cayenne.query.UpdateBatchQuery$1.getValue(
> > >>> UpdateBatchQuery.java:124)
> > >>>
> > >>> at
> > >>>
> > >>
> > org.apache.cayenne.access.translator.batch.UpdateBatchTranslator.updateBindings(
> > >>> UpdateBatchTranslator.java:80)
> > >>>
> > >>> at org.apache.cayenne.access.jdbc.BatchAction.runAsIndividualQueries(
> > >>> BatchAction.java:191)
> > >>>
> > >>> at org.apache.cayenne.access.jdbc.BatchAction.performAction(
> > >>> BatchAction.java:93)
> > >>>
> > >>> at org.apache.cayenne.access.DataNodeQueryAction.runQuery(
> > >>> DataNodeQueryAction.java:97)
> > >>>
> > >>> at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:273)
> > >>>
> > >>> at
> > >>>
> > >>
> > org.apache.cayenne.access.flush.DefaultDataDomainFlushAction.lambda$executeQueries$6(
> > >>> DefaultDataDomainFlushAction.java:177)
> > >>>
> > >>> at java.util.HashMap.forEach(HashMap.java:1290)
> > >>>
> > >>> at
> > >>>
> > >>
> > org.apache.cayenne.access.flush.DefaultDataDomainFlushAction.executeQueries(
> > >>> DefaultDataDomainFlushAction.java:176)
> > >>>
> > >>> at org.apache.cayenne.access.flush.DefaultDataDomainFlushAction.flush(
> > >>> DefaultDataDomainFlushAction.java:89)
> > >>>
> > >>> at
> > org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:637)
> > >>>
> > >>> at org.apache.cayenne.access.DataDomain.onSyncNoFilters(
> > >>> DataDomain.java:609)
> > >>>
> > >>> at
> > org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(
> > >>> DataDomain.java:835)
> > >>>
> > >>> at org.apache.cayenne.tx.TransactionFilter.lambda$onSync$0(
> > >>> TransactionFilter.java:61)
> > >>>
> > >>> at
> > >>>
> > >>
> > org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInTransaction(
> > >>> DefaultTransactionManager.java:180)
> > >>>
> > >>> at
> > >>>
> > >>
> > org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInNewTransaction(
> > >>> DefaultTransactionManager.java:152)
> > >>>
> > >>> at
> > >>>
> > >>
> > org.apache.cayenne.tx.DefaultTransactionManager$NestedTransactionHandler.handle(
> > >>> DefaultTransactionManager.java:95)
> > >>>
> > >>> at
> > org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(
> > >>> DefaultTransactionManager.java:62)
> > >>>
> > >>> at
> > org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(
> > >>> DefaultTransactionManager.java:40)
> > >>>
> > >>> at org.apache.cayenne.tx.TransactionFilter.onSync(
> > >>> TransactionFilter.java:61)
> > >>>
> > >>> at
> > org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(
> > >>> DataDomain.java:834)
> > >>>
> > >>> at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:596)
> > >>>
> > >>> at org.apache.cayenne.access.DataContext.flushToParent(
> > >>> DataContext.java:737)
> > >>>
> > >>> ... 2 more
> > >>>
> > >>>
> > >>>
> > >>
> >
> >
--
Best regards,
Nikita Timofeev
ive in two separate
> contexts (Entities vs DB); but I have no more ideas on how to progress.
>
> Does anyone have any suggestions on how to do this stunt?
>
> Cheers,
> Giulio Cesare
--
Best regards,
Nikita Timofeev
n committed.
> >> Customers: 169770
> >> ------
> >>
> >> As you can see, the fetch returns 462.653 rows which is the number of
> >> customers in the DB, and the number I expected.
> >> However, the resulting list only contains 169.770 objects—the number of
> >> distinct values of CPRNR.
> >>
> >> Why? It's not a distinct fetch. I'm feeling particularly stupid today, and
> >> I'm definitely missing something here, I just don't understand what :).
> >>
> >> Cheers,
> >> - hugi
> >
>
--
Best regards,
Nikita Timofeev
ava:54)
> at
> org.apache.cayenne.configuration.server.DataContextFactory.createdFromDataDomain(DataContextFactory.java:115)
> at
> org.apache.cayenne.configuration.server.DataContextFactory.createContext(DataContextFactory.java:61)
> at
> org.apache.cayenne.configuration.CayenneRuntime.newContext(CayenneRuntime.java:124)
>
>
> Thanks,
>
> best,
>
--
Best regards,
Nikita Timofeev
enne.dbsync.reverse.filters.FiltersConfigBuilder.processCatalogs
> > (FiltersConfigBuilder.java:107)
> >at
> > org.apache.cayenne.dbsync.reverse.filters.FiltersConfigBuilder.preBuildFilters
> > (FiltersConfigBuilder.java:87)
> >
> > getSchemas() throws this exception.
> >
> > This error could be related to
> > https://issues.apache.org/jira/browse/CAY-2600
> > Any idea how to use cdbimport without schema?
> >
> > Kind regards,
> > Maria
>
--
Best regards,
Nikita Timofeev
ce the ST-Functions are not implemented yet.
> >
> > When looking at Cayenne spatial implementation, WKT wrapper were added to
> > the MySQLTreeProcessor and PostgreSQLTreeProcessor.
> > Both Processors extend a TypeAwareSQLTreeProcessor and and add the
> > "ST_"-Convert commands as required.
> > In contrast the current SQLiteTreeProcessor extends BaseSQLTreeProcessor.
> > Having no registerColumnProcess, the WKT convert can't take place in the
> > same way like before.
> > Let me know if someone has an idea how to overcome this problem.
> > Thanks.
>
--
Best regards,
Nikita Timofeev
y custom functions in the WHERE clause as well?
>
> Andrus
>
> [1] https://cayenne.apache.org/docs/4.2/cayenne-guide/#value-object-type
> <https://cayenne.apache.org/docs/4.2/cayenne-guide/#value-object-type>
> [2]
> https://github.com/apache/cayenne-examples/blob/master/c
browse/CAY-2684
>
>
>
> --
> *Markus Reich*
> Waldweg 62
> 6393 St. Ulrich am Pillersee
> www.markusreich.at / www.meeximum.at
> markus.re...@markusreich.at
--
Best regards,
Nikita Timofeev
jetty.security.authentication.LoginAuthenticator.setConfiguration(LoginAuthenticator.java:76)
>
> Em sex., 10 de jul. de 2020 às 10:46, Nikita Timofeev <
> ntimof...@objectstyle.com> escreveu:
>
> > Hi all,
> >
> > I think that 4.1 is fully ready for the final release.
> &
Hi all,
I think that 4.1 is fully ready for the final release.
But first I wanted to check if I missing something.
Are there any problems that are not in Jira?
Or everything is good and I could go with the release?
--
Best regards,
Nikita Timofeev
a standard server configuration using WebAppContext?
>
>
>
> On Mon, Jul 6, 2020 at 1:22 PM Dayvyd . wrote:
>
> > Hi, Nikita.
> >
> > Does not authorization, error:
> >
> > 2020-07-06 13:14:42.153:WARN::Request /saudeplusserver failed - no realm
> >
> &
faultScopeProvider.get(DefaultScopeProvider.java:50)
> > > at
> > >
> > org.apache.cayenne.di.spi.DefaultInjector.getInstance(DefaultInjector.java:134)
> > > at
> > >
> > org.apache.cayenne.configuration.CayenneRuntime.newContext(CayenneRuntime.java:124)
> > > at br.com.saudeplus.model.client.Main.main(Main.java:25)
> > > Caused by: java.rmi.RemoteException: unknown code for readObject at 0x3c
> > > (<); nested exception is:
> > > com.caucho.hessian.io.HessianProtocolException: unknown code for
> > readObject
> > > at 0x3c (<)
> > > at
> > >
> > org.apache.cayenne.rop.ProxyRemoteService.establishSession(ProxyRemoteService.java:46)
> > > at
> > >
> > org.apache.cayenne.rop.HttpClientConnection.connect(HttpClientConnection.java:93)
> > > ... 17 more
> > > Caused by: com.caucho.hessian.io.HessianProtocolException: unknown code
> > for
> > > readObject at 0x3c (<)
> > > at com.caucho.hessian.io.HessianInput.error(HessianInput.java:1697)
> > > at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1177)
> > > at
> > >
> > org.apache.cayenne.rop.HessianROPSerializationService.deserialize(HessianROPSerializationService.java:67)
> > > at
> > >
> > org.apache.cayenne.rop.ProxyRemoteService.establishSession(ProxyRemoteService.java:44)
> > > ... 18 more
> > >
> > >
> > > --
> > > Att, Dayvyd
> > >
> > >
> > > <
> > http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> > >
> > > Livre
> > > de vírus. www.avg.com
> > > <
> > http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> > >.
> > > <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >
> >
--
Best regards,
Nikita Timofeev
implements ExtendedType.
> > > > >>>>> In 4.0.2 the method:
> > > > >>>>>
> > > > >>>>> public SourceId materializeObject(ResultSet rs, int index, int
> > > > >>>>> type) throws Exception
> > > > >>>>>
> > > > >>>>> was invoked, but not in 4.2.
> > > > >>>>>
> > > > >>>>> We register our class in this way:
> > > > >>>>>
> > > > >>>>> public class DataloyOracleAdapter extends OracleAdapter {
> > > > >>>>>
> > > > >>>>> public DataloyOracleAdapter(@Inject RuntimeProperties
> > > > >>>>> runtimeProperties,
> > > > >>>>> @Inject(Constants.SERVER_DEFAULT_TYPES_LIST)
> > > > >>>>> List defaultExtendedTypes,
> > > > >>>>> @Inject(Constants.SERVER_USER_TYPES_LIST)
> > > > >>>>> List userExtendedTypes,
> > > > >>>>> @Inject(Constants.SERVER_TYPE_FACTORIES_LIST)
> > > > >>>>> List extendedTypeFactories,
> > > > >>>>> @Inject(Constants.SERVER_RESOURCE_LOCATOR)
> > > > >>>>> ResourceLocator resourceLocator,
> > > > >>>>> @Inject ValueObjectTypeRegistry
> > > > >>>>> valueObjectTypeRegistry) {
> > > > >>>>> super(runtimeProperties, defaultExtendedTypes,
> > > > >>>>> userExtendedTypes, extendedTypeFactories, resourceLocator,
> > > > >>>>> valueObjectTypeRegistry);
> > > > >>>>> setSupportsGeneratedKeys(false);
> > > > >>>>> //super.setPkGenerator(new DataloyPkGenerator());
> > > > >>>>>
> > > > >>>>> setSupportsBatchUpdates(false);
> > > > >>>>> this.extendedTypes.registerType(new SourceIdType());
> > > > >>>>> }
> > > > >>>>>
> > > > >>>>>
> > > > >>>>> }
> > > > >>>>>
> > > > >>>>>
> > > > >>>>> What is wrong? What should be changed?
> > > > >>>>>
> > > > >>>>> Many regards,
> > > > >>>>> Andrea
> > > > >>>>
> > > > >>>>
> > > > >>
> > > > >>
> > > >
> > > >
> > >
> >
--
Best regards,
Nikita Timofeev
operties
> >>>>>
> >>>>>
> >>>>> Your template can reference an instance of your util class using the
> >>>> short
> >>>>> name defined for it in the tools.properties file:
> >>>>>
> >>>>>
> >>>>> ${*myUtils*.getGwtType($attr.Type)}
> >>>>>
> >>>>>
> >>>>> This process has multiple points of failure, so it can be hard to
> >>>>> setup correctly, but hopefully you can get it working.
> >>>>>
> >>>>>> On Wed, Apr 29, 2020 at 11:29 AM Faizel Dakri
> >> wrote:
> >>>>>
> >>>>>> Hello all,
> >>>>>>
> >>>>>> Being fairly new to Cayenne, this may be an obvious question. I would
> >>>> like
> >>>>>> to know how I can access the metadata stored on an
> >>>>>> attribute/relationship/entity in the datamap from within my velocity
> >>>>>> templates (I think in CayenneModeler, this is how the comment field is
> >>>>>> stored for a datamap item). I think this is the metadata stored via
> >> the
> >>>>>> newish InfoExtension facility.
> >>>>>>
> >>>>>> I see that the DataChannelMetaData can be injected into a DataDomain
> >>>> (and
> >>>>>> I’m doing that at runtime in my server app), however I cannot see how
> >> to
> >>>>>> get to this metadata from an attribute or relationship or entity in
> >> the
> >>>>>> context of a velocity template. Is this possible? I would think it is
> >>>> since
> >>>>>> Modeler is able to read/write those comments, but I am having a hard
> >>>> time
> >>>>>> doing so in a template.
> >>>>>>
> >>>>>> I did see that there is a hook to provide my own tool into the cgen
> >>>> tool.
> >>>>>> Would this be a potential path to look into if the metadata is not
> >>>>>> accessible directly in the templates as is? If so, any pointers on
> >>>> where to
> >>>>>> start?
> >>>>>>
> >>>>>> Thanks for any advice.
> >>>>>>
> >>>>>> F
> >>>>>>
> >>>>>> --
> >>>>>> Faizel Dakri
> >>>>>> list...@dakri.com
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>
>
--
Best regards,
Nikita Timofeev
t; Note in JDBC I can execute the following it works
> .
> Connection connection = dataSource.getConnection();
> connection.createStatement().execute("SET ROLE browse_japan");
> connection.createStatement().execute("ALTER SESSION SET CURRENT_SCHEMA =
> JAPAN");
--
Best regards,
Nikita Timofeev
> What does it mean and how do I correct for it?
>
> Thanks,
>
> Andrew
>
>
--
Best regards,
Nikita Timofeev
tly inter-datamap references... referecens in same
> datamap are ok.
> The skeleton for the inter-datamap relationships are shown with empty targets
> and details.
>
> Thanks for your great tool.
>
> Atte. Juan Manuel Díaz Lara
--
Best regards,
Nikita Timofeev
),
> PcExpressPosUUIDPkGenerator.class);
> But when trying to create my first context get this error:
> org.apache.cayenne.di.DIRuntimeException: DI container has no binding for key
>
>
> Atte. Juan Manuel Díaz Lara
--
Best regards,
Nikita Timofeev
is to be get the "comment" of the mapping node of attributes to generate
> additional features to _baseClasses. I really need then at run time but I
> will be happy if I can get it at generation time.
> Thanks.
>
> Atte. Juan Manuel Díaz Lara
--
Best regards,
Nikita Timofeev
vities...but sometimes they're really useful on POJOs too.
> > The
> > > new Property related classes (like EntityProperty) require the class to
> > be
> > > a subclass of Persistent. I can't see where this is actually
> > > relevant...but I might be missing something. Any reason we couldn't
> > remove
> > > this restriction?
> > >
> > > Thanks,
> > >
> > > Lon
> > >
> > > P.S. -- Still wishing these also implemented Serializable :P
> >
> >
--
Best regards,
Nikita Timofeev
-2635
[3] https://github.com/apache/cayenne/blob/STABLE-4.1/RELEASE-NOTES.txt#L15-L23
--
Best regards,
Nikita Timofeev
reality "57874832" is the order_number and "1" is the order_line_number,
> but the query generator has swapped them. I've verified the joins in the
> modeler (and 4.1 works).
>
> Thanks,
>
> Lon
--
Best regards,
Nikita Timofeev
:57874777, 8->order_number:57874715,
> 9->order_number:57874714, 10->order_number:57874713,
> 11->order_number:57874712, 12->order_number:57874708,
> 13->order_number:57874707, 14->order_number:57874704,
> 15->order_number:57874657]
>
> Thoughts? I also don't like that it's not writing the "ON" in parenthesis,
> but I'm sure that's just me be a persnickety old man. 👴
>
> -Lon
>
--
Best regards,
Nikita Timofeev
WHERE ( ( t0.business_unit = ? ) AND ( t0.start_date <= ? ) AND (
> t0.end_date > ? ) AND ( t0.key_code_required = ? ) AND t0.promo_type IN (
> ?) ) *AND* ( t1.key_code = ? ) [bind: 1->business_unit:'SP',
> 2->start_date:2019-05-01T17:57:19.12333,
> 3->end_date:2019-05-01T17:57:19.12333, 4->key_code_required:'true',
> 5->promo_type:'BUY ANY GET Y', 6->key_code:'EDLP10']
>
> Thoughts?
>
> Thanks,
>
> Lon
--
Best regards,
Nikita Timofeev
ted. Also if I don't access
> > the
> > >> relationship before serialization, then there is no error on
> > >> deserialization.
> > >>
> > >> You can download a test application here:
> > >> https://ds.varscsak.com:5001/d/f/4734
ow I haven't encountered a
> problem with that before.
>
> Any thoughts?
>
> -Lon
--
Best regards,
Nikita Timofeev
eased/
--
Best regards,
Nikita Timofeev
s is a Maven adapter to DefaultClassGenerator class.
>
> cayenne:cdbimport
> Description: Maven mojo to reverse engineer datamap from DB.
>
> cayenne:cgen
> Description: Maven mojo to perform class generation from data map. This
> class is an Maven adapter to DefaultClassGenerator class.
>
>
--
Best regards,
Nikita Timofeev
t has has to-many joins. When I
>>> go to do a join across these, I will no longer get a distinct set of data
>>> (because at least in Sybase, you can't 'distinct' a blob column).
>>>
>>> Any ideas on how to implement this so that the blob is lazy and/or in a
>>> different entity (without it actually being in a different table)?
>>>
>>> -Lon
>>
>
--
Best regards,
Nikita Timofeev
tln("Committed " + counter.get()[0] + "
> object(s)");
> counter.set(null);
> }
> }
>
> @PostPersist(entityAnnotations = Tag.class)
> @PostUpdate(entityAnnotations = Tag.class)
> @PostRemove(entityAnnotations = Tag.class)
> void afterCommit(Persistent object) {
> counter.get()[0]++;
> }
> }
>
>
>
>
> Regards
>
> Tim
--
Best regards,
Nikita Timofeev
yenne and making it better!
[1]
https://github.com/apache/cayenne/blob/3.1.2/docs/doc/src/main/resources/RELEASE-NOTES.txt
[2] https://github.com/apache/cayenne/blob/4.1.M2/UPGRADE.txt
[3] https://github.com/apache/cayenne/blob/4.1.M2/RELEASE-NOTES.txt
--
Best regards,
Nikita Timofeev
"HTML" must end with
>>>>> '>'. datamap.map.xml /my-project/src/main/resources line 2 Problem
>>>>> The document type declaration for root element type "HTML" must end with
>>>>> '>'. datamap.map.xml /my-project/src/main/resources line 2 Problem
>>>>> The document type declaration for root element type "HTML" must end with
>>>>> '>'. datamap.map.xml /my-project/src/main/resources line 2 Problem
>>>>> The document type declaration for root element type "HTML" must end with
>>>>> '>'. datamap.map.xml /my-project/src/main/resources line 2 Problem
>>>>> The document type declaration for root element type "HTML" must end with
>>>>> '>'. datamap.map.xml /my-project/src/main/resources line 2 Problem
>>>>> The document type declaration for root element type "HTML" must end with
>>>>> '>'. datamap.map.xml /my-project/src/main/resources line 2 Problem
>>>>> The document type declaration for root element type "HTML" must end with
>>>>> '>'. datamap.map.xml /my-project/src/main/resources line 2 Problem
>>>>> The document type declaration for root element type "HTML" must end with
>>>>> '>'. datamap.map.xml /my-project/src/main/resources line 2 Problem
>>>>> The document type declaration for root element type "HTML" must end with
>>>>> '>'. datamap.map.xml /my-project/src/main/resources line 2 Problem
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
--
Best regards,
Nikita Timofeev
Hi all,
Wanted to share with you screenshot of Cayenne Modeler with new icons [1].
Everyone agreed earlier that we need some colors back, so here they are.
Any thoughts?
[1]
https://drive.google.com/file/d/1RiSbuRogij4OkQfyCZRFVjmX4Vj1J68r/view?usp=sharing
--
Best regards,
Nikita Timofeev
ADataDomainProvider.class);
>
>
> binder.bind(ObjectContextFactory.class).to(PCADataContextFactory.class);
>
> }
>
> }
>
>
>
> Atte. Juan Manuel Díaz Lara
--
Best regards,
Nikita Timofeev
public DbAdapter createAdapter(DatabaseMetaData md) throws SQLException {
> PostgresAdapter db = (PostgresAdapter) super.createAdapter(md);
> db.setPkGenerator(new PcExpressPosUUIDPkGenerator(db));
> return db;
> }
> }
> PcExpressPosUUIDPkGenerator detects pk columns of type UUID and generates a
> uuid for then,.. thats all.
>
>
>
> Atte. Juan Manuel Díaz Lara
--
Best regards,
Nikita Timofeev
ctory in the node definition to
>> org.apache.cayenne.configuration.server.PropertyDataSourceFactory, it does
>> read the command-line properties.
>
> That should sorta happen automatically. We are still looking why it doesn't.
>
> Andrus
>
--
Best regards,
Nikita Timofeev
roid? I’m considering making an android
>>> equivalent of an iOS app that uses Core Data. It would be great to have an
>>> ORM on the Android side.
>>>
>>> Thanks for any thoughts!
>>>
>>> Ken
>
--
Best regards,
Nikita Timofeev
bAttr, Expression pathExp)
> 294: String alias = (queryAssembler.supportsTableAliases()) ? queryAssembler
> 295:.getCurrentAlias() : null;
>
> returns root table alias (usually "t0") instead of joined table ("t1" or
> other), if pathExp was matchDbExp
--
Best regards,
Nikita Timofeev
e generates here and generate
> UPPER() or LOWER() comparisons so that I can continue using the existing
> indexes, and what would be the recommended way to do that?
>
> Thanks
> Maik
>
--
Best regards,
Nikita Timofeev
being the same product (the same object on my tests).
>>
>> The generated SQL from the log is:
>>SELECT <>
>>FROM public.products t0 JOIN public.stockcurrent_corporativo t1 ON (
>> t0.id = t1.product) WHERE (t1.units > ?) AND (t0.code LIKE ?)ORDER
>> BY t0.name [bind: 1->units:0.0, 2->code:'USBVGA']
>>
>>
>> EXISTENCIAS_CORPORATIVAS is a toMany relationship from Product and have
>> type StockCurrentCorporativo, defined in _Product as :
>>
>> public static final Property>
>> EXISTENCIAS_CORPORATIVAS = Property.create("existenciasCorporativas",
>> List.class);
>>
>>
>> To be fair, I do not know when this started, the production app is
>> working well, this is on a my development environment when I started to
>> work for a new requirement.
>> I reviewed the mapping and it looks ok, any help will be appreciated.
>>
>> Atte. Juan Manuel Díaz Lara
>>
--
Best regards,
Nikita Timofeev
at
> org.apache.cayenne.tx.BaseTransaction.connectionAdded(BaseTransaction.java:246)
> at
> org.apache.cayenne.tx.CayenneTransaction.connectionAdded(CayenneTransaction.java:49)
> at
> org.apache.cayenne.tx.BaseTransaction.addConnection(BaseTransaction.java:231)
> at
> org.apache.cayenne.tx.BaseTransaction.getOrCreateConnection(BaseTransaction.java:203)
> at
> org.apache.cayenne.access.DataNode$TransactionDataSource.getConnection(DataNode.java:446)
> at
> org.apache.cayenne.access.DataNode.performQueries(DataNode.java:273)
> ... 24 more
>
--
Best regards,
Nikita Timofeev
>
>
>
>
>
>
> On 12/10/17 12:51 PM, Nikita Timofeev wrote:
>>
>> ServerRuntime.builder().addModule(new Java8Module())
>
>
--
Best regards,
Nikita Timofeev
s needed by
> Cayenne to utilize the java8 classes?
>
>
> On 12/10/17 10:58 AM, Nikita Timofeev wrote:
>>
>> Well, this definitely looks like cayenne-java8 module missing. Cayenne
>> tries to store your LocalDateTime as byte[].
>>
>> On Thu, Oct 12, 2017 at 4:3
create("dTCreated", LocalDateTime.class);
> public static final Property D_TUPDATED =
> Property.create("dTUpdated", LocalDateTime.class);
> public static final Property HASHED_ACCOUNT_NUMBER =
> Property.create("hashedAccountNumber", String.class);
>
nce(new
>> FilesystemResourceLocator(new File("etc")));
>>
>> ServerModule.contributeProperties(binder).put(Constants.SERVER_CONTEXTS_SYNC_PROPERTY,
>> "false");
>> };
>>
>> ServerRuntime cayenneRuntime =
>> ServerRuntime.builder().addConfig(DB_FILE)
>> .addModule(myModule)
>> .build();
>> ObjectContext test = cayenneRuntime.newContext();
>> test.commitChanges();
>>
>> When I run my code within my IDE (Netbeans) I do not get this error so I'm
>> missing something from my jar package but I'm not sure what.
>>
>> Thanks,
>>
>> Andrew
>>
>
--
Best regards,
Nikita Timofeev
Yes you can add this property:
Property property3 = Property.createSelf(Cargo.class);
But this will eagerly fetch all content of Cargo.
On Wed, Oct 4, 2017 at 3:30 PM, a...@dataloy.com wrote:
>
>
> On 2017-10-04 13:57, Nikita Timofeev wrote:
>> ObjectSelect.columnQuery can se
must return because I have tables
> with hundreds of columns that I do not need, returning all the columns every
> time is very time consuming.
>
> Andrea
--
Best regards,
Nikita Timofeev
13:59, Nikita Timofeev wrote:
>> Correct way to do this in 4.0:
>>
>> runtime = ServerRuntime.builder().addConfig(CONFIG).addModule(new
>> DataloyOracleModule()).build();
>>
>> On Mon, Oct 2, 2017 at 2:54 PM, a...@dataloy.com wrote:
>> >
>> >
t; wrote:
>>
>>
>> On 2017-10-02 13:59, Nikita Timofeev wrote:
>> > Correct way to do this in 4.0:
>> >
>> > runtime = ServerRuntime.builder().addConfig(CONFIG).addModule(new
>> > DataloyOracleModule()).build();
>> >
>> > On M
Correct way to do this in 4.0:
runtime = ServerRuntime.builder().addConfig(CONFIG).addModule(new
DataloyOracleModule()).build();
On Mon, Oct 2, 2017 at 2:54 PM, a...@dataloy.com wrote:
>
>
> On 2017-10-02 13:40, Nikita Timofeev wrote:
>> How do you create ServerRuntime?
@Inject(Constants.SERVER_DEFAULT_TYPES_LIST)
> List defaultExtendedTypes,
> @Inject(Constants.SERVER_USER_TYPES_LIST)
> List userExtendedTypes,
> @Inject(Constants.SERVER_TYPE_FACTORIES_LIST)
> List extendedTypeFactories,
> @Inject(Constants.SERVER_RESOURCE_LOCATOR)
> ResourceLocator resourceLocator,
> @Inject ValueObjectTypeRegistry
> valueObjectTypeRegistry) {
> super(runtimeProperties, defaultExtendedTypes,
> userExtendedTypes, extendedTypeFactories, resourceLocator,
> valueObjectTypeRegistry);
> setSupportsGeneratedKeys(false);
> setSupportsBatchUpdates(false);
>
> }
>
> @Override
> protected PkGenerator createPkGenerator() {
> return new DataloyPkGenerator();
> }
>
> }
>
> Any ideas!
>
>
--
Best regards,
Nikita Timofeev
yenne.access.trans.BatchQueryBuilder
> - org.apache.cayenne.access.trans.InsertBatchQueryBuilder
> - org.apache.cayenne.access.trans.UpdateBatchQueryBuilder
>
> with what they have been replaced? There is some documentation regarding such
> refator?
>
> Many regards,
> Andrea Biasillo
>
>>
--
Best regards,
Nikita Timofeev
rading my templates to use field based data objects, but the new
> templates use Property> for to-many relationships whereas my old
> templates just used Property. The new signature makes sense, but it also
> means that I can no longer use Property.eq( E ) for this.
>
> Cheers,
> - hugi
--
Best regards,
Nikita Timofeev
; object to be referenced by another object before it is committed? I was
>>>> hoping to not have to worry about this as a "high-level" user of Cayenne.
>>>
>>>
>>> You are right, you don't need to worry about all that. Just create one
>>> context and save it at the end. Cayenne tracks the relationships between
>>> objects with a temporary key internally, but you don't need to think about
>>> that. Once Caynenne commits, everything is assigned proper primary keys and
>>> joined.
>>>
>>> Ari
>>>
>>>
>>
--
Best regards,
Nikita Timofeev
d save it at the end. Cayenne tracks the relationships between
> objects with a temporary key internally, but you don't need to think about
> that. Once Caynenne commits, everything is assigned proper primary keys and
> joined.
>
> Ari
>
>
> --
> ------>
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
--
Best regards,
Nikita Timofeev
t; at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at com.vaadin.event.ListenerMethod.receiveEvent(Listener
Type ct =
> ClientBaseAdmin.getObjectContext().newObject(CommunicationType.class);
> ct.setDescription(value);
> ClientBaseAdmin.getObjectContext().commitChanges();
> result = ct;
> }
> return result;
> }
>
--
Best regards,
Nikita Timofeev
onSync(DataDomain.java:764)
> >> at org.apache.cayenne.access.DataDomain.onSync(DataDomain.
> java:590)
> >> at org.apache.cayenne.access.DataContext.flushToParent(
> DataContext.java:742)
> >> at org.apache.cayenne.access.DataContext.commitChanges(
> DataContext.java:691)
> >> at pktest.Main.main(Main.java:28)
> >>
> >>
> >>
> >> If someone would like to have a look, I've created a project that
> replicates the problem—just build it and run pktest.Main
> >>
> >> https://github.com/hugith/pktest <https://github.com/hugith/pktest>
> >>
> >> Cheers,
> >> - hugi
> >
>
>
--
Best regards,
Nikita Timofeev
adinServlet.service(VaadinServlet.java:381)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilte
> r.java:52)
> org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log
> 4jServletFilter.java:71)
>
>
--
Best regards,
Nikita Timofeev
a Kolbachev
> wrote:
>
>> Here is my +1 as well.
>>
>> On Thu, Jul 27, 2017 at 11:16 PM, Musall, Maik
>> wrote:
>>
>> > +1
>> >
>> > > Am 27.07.2017 um 14:35 schrieb Nikita Timofeev <
>> > ntimof...@objectstyle.com>:
&
TransactionFilter$1.perform(TransactionFilter.java:73)
>>>> at
>>>> org.apache.cayenne.tx.TransactionFilter$1.perform(TransactionFilter.java:70)
>>>> at
>>>> org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:87)
>>>> at
>>>> org.apache.cayenne.tx.DefaultTransactionManager.performInLocalTransaction(DefaultTransactionManager.java:59)
>>>> at
>>>> org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:52)
>>>> at
>>>> org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:40)
>>>> at
>>>> org.apache.cayenne.tx.TransactionFilter.onSync(TransactionFilter.java:70)
>>>> at
>>>> org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:764)
>>>> at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:590)
>>>> at
>>>> org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:742)
>>>> ... 18 more
>>>>
>>>> This again points to this mail thread:
>>>> http://cayenne.195.n3.nabble.com/Erratic-AshwoodEntitySorter-NPE-on-Latest-Snapshot-td4027453.html#a4028225
>>>>
>>>> <http://cayenne.195.n3.nabble.com/Erratic-AshwoodEntitySorter-NPE-on-Latest-Snapshot-td4027453.html#a4028225>
>>>> and the NPE message is actually an output of the mentioned commit that
>>>> Andrus added at the time, but the mail thread stopped there in December.
>>>>
>>>> The mentioned class PDCUserLeafletLog has @SortWeight(1000), inherited
>>>> from the CayenneDataObject subclass that I use for everything. I assigned
>>>> lower sort weights, starting at 1, for the main root classes that should
>>>> be inserted first, incrementing for each relationship from there.
>>>>
>>>> So at this point, I'm at a loss how to solve this. Any help is greatly
>>>> appreciated.
>>>>
>>>> Thanks
>>>> Maik
>>>>
>>>
>>
>>
>>
>> --
>> Best regards,
>> Nikita Timofeev
>
--
Best regards,
Nikita Timofeev
> On 2 Aug 2017, at 15:54, Amedeo Mantica wrote:
>>
>> Hi,
>> may be related to this ?
>>
>> https://github.com/apache/cayenne/commit/814de6546f03e5276d2d100b4c79fe2d4062d5f6
>>
>> has been included in 4 ?
>>
>> Amedeo
>>
>>> On 2
org.apache.cayenne.tx.TransactionFilter.onSync(TransactionFilter.java:70)
>> at
>> org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:764)
>> at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:590)
>> at
>> org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:742)
>> ... 18 more
>>
>> This again points to this mail thread:
>> http://cayenne.195.n3.nabble.com/Erratic-AshwoodEntitySorter-NPE-on-Latest-Snapshot-td4027453.html#a4028225
>>
>> <http://cayenne.195.n3.nabble.com/Erratic-AshwoodEntitySorter-NPE-on-Latest-Snapshot-td4027453.html#a4028225>
>> and the NPE message is actually an output of the mentioned commit that
>> Andrus added at the time, but the mail thread stopped there in December.
>>
>> The mentioned class PDCUserLeafletLog has @SortWeight(1000), inherited from
>> the CayenneDataObject subclass that I use for everything. I assigned lower
>> sort weights, starting at 1, for the main root classes that should be
>> inserted first, incrementing for each relationship from there.
>>
>> So at this point, I'm at a loss how to solve this. Any help is greatly
>> appreciated.
>>
>> Thanks
>> Maik
>>
>
--
Best regards,
Nikita Timofeev
he 3.0 docs it suggests
> that it supports this for SQLServer (which was originally based on
> Sybase)…but I can’t seem to find it in the code. Any idea where this is?
> Does it still exist?
>
> Thanks,
>
> Lon
--
Best regards,
Nikita Timofeev
being loaded.
>
> Any ideas what I might be doing wrong?
>
> Thanks,
> /Fredrik
--
Best regards,
Nikita Timofeev
reason is smooth transition to Java 9 that will be ready
hopefully soon and optimization in Cayenne internals.
Any thoughts or concerns?
[1]
https://lists.apache.org/thread.html/35fd12dafc30eac3b3390c5ae0ba7bda00185e085af669e4dc5c6fac@%3Cdev.cayenne.apache.org%3E
--
Best regards,
Nikita Timofeev
nships either get nulled out or I get that missing object
> exception. It seems like the initial part is doing all the right stuff…but
> something later is going awry.
>
> -Lon
>
> On Fri, Jul 21, 2017 at 2:06 AM, Nikita Timofeev
> wrote:
>
>> Well, I'm afrai
at’s the best approach here (it’s not auto-assigned).
>>
>> Also, it seems like there could be a special case in this scenario when
>> localing objects from another OC (parent) that handles TEMP ObjectIds
>> differently. There would never be a situation where you’d want t
question is new on an OrderHeader
>> which isn’t new.
>>
>> -Lon
>>
>> On Wed, Jul 19, 2017 at 1:23 PM, Lon Varscsak
>> wrote:
>>>
>>> Okay, I’ll see if I can work up a test case. Note: This only happens if
>>> the objects in questio
gt; is there and all is good in the world.
>>> >
>>> > The moment I touch the object (setting a simple property with
>>> writeProperty) in the relationship the reverse relationship gets nulled
>>> out. Any thoughts as to why this might happen?
>>> >
>>> > -Lon
>>> >
>>>
>>>
>>
--
Best regards,
Nikita Timofeev
vendeursWeb-1.0.jar --config=config.yml —server
>
> Still connect to the URL defined in the model.
>
>> Le 12 juin 2017 à 09:32, Nikita Timofeev a écrit
>> :
>>
>> Hi Pascal,
>>
>> Yes you can setup DataSource via PropertyDataSourceFactory[1] that can
-1.0.jar!/revendeurs.map.xml
>>> INFO [2017-06-09 15:08:32,338] bootique-http-36
>>> o.a.c.c.XMLDataChannelDescriptorLoader: Loading XML DataMap resource from
>>> jar:file:/opt/bin/RevendeursWeb-1.0.jar!/utilisateurs.map.xml
>>>
>>> INFO [2017-06-09 15:08:32,366] bootique-http-36 o.a.c.d.DriverDataSource:
>>> Connecting to 'jdbc:mysql://legestionnaire.druide:3306/filemaker' as
>>> 'filemaker'
>>> INFO [2017-06-09 15:08:32,413] bootique-http-36 o.a.c.d.DriverDataSource:
>>> *** Connecting: FAILURE.
>>>
>>> What’s the trick?
>>
>
--
Best regards,
Nikita Timofeev
This one fixed too. Waiting for the next one :)
On Fri, May 26, 2017 at 4:03 PM, Nikita Timofeev
wrote:
> Yes, that's right :) I see this now in my test too, code path that I
> don't like (and that is hard to step on) bites again.
>
> On Fri, May 26, 2017 at 3:53 PM,
>
> - hugi
>
>
>> On 26 May 2017, at 12:48, Nikita Timofeev wrote:
>>
>> Yes, fix definitely affected this query, but seems that it's not broke
>> something, but rather revealed some other hidden bug.
>> What is the type of DbAttribute mapped o
org.apache.cayenne.BaseContext.select(BaseContext.java:307)
> at org.apache.cayenne.BaseContext.selectFirst(BaseContext.java:331)
> at
> org.apache.cayenne.query.ColumnSelect.selectFirst(ColumnSelect.java:660)
> at strimillinn.core.model.Sku.number(Sku.java:54)
>
>
t;> On 24 May 2017, at 14:52, Nikita Timofeev wrote:
>>
>> Hi Hugi,
>>
>> Seems like custom types are broken in ColumnSelect, I see this bug in
>> my test too.
>>
>> On Wed, May 24, 2017 at 5:34 PM, Hugi Thordarson wrote:
>>> I'
illinnCore.newContext() );
>
> for( Object[] row : list ) {
> System.out.println( Arrays.asList( row ) );
> }
> }
>
> …the fetch will fail with a ClassCastException ([Ljava.lang.Object; cannot be
> cast to org.apache.cayenne.DataRow).
>
> Any other way to do it? Or am I misremembering that this was possible?
>
> Cheers,
> - hugi
--
Best regards,
Nikita Timofeev
ects using ColumnSelect, the values get
>>>> returned as byte arrays instead of actual objects. Example:
>>>>
>>>> LocalDateTime creationDate = ObjectSelect
>>>> .query( User.class )
>>>> .column( User.CREATION_DATE )
>>>> .selectFirst( Jambalaya.newContext() );
>>>>
>>>> User.creationDate() is a LocalDateTime—but the fetch will fail since the
>>>> returned value is a byte array.
>>>>
>>>> Bug?
>>>>
>>>> Cheers,
>>>> - hugi
>>>
>>
>
--
Best regards,
Nikita Timofeev
Looks like only I can enjoy attached pictures, sorry for that,
here is direct link to them:
https://drive.google.com/drive/folders/0B6enHnp2XFECTUEyazVHd3ZuUE0?usp=sharing
On Sat, May 6, 2017 at 11:11 AM, Nikita Timofeev
wrote:
> Hi all,
>
> As Cayenne approaching 4.0.BETA re
and play.
Windows version:
Mac version:
Generic version on Ubuntu:
--
Best regards,
Nikita Timofeev
to parent context and moreover validation relies on GraphDiff
implementation that is unknown to filters.
2. When pulling callbacks to DataContext filters that rely on them
will stop working (like CacheInvalidationFilter or old AuditableFilter).
On Thu, Apr 6, 2017 at 3:05 PM, Nikita Timofeev
w
Y;
>
> Thank you
> Amedeo
--
Best regards,
Nikita Timofeev
wrote:
>>>>>
>>>>>> Hi Michael,
>>>>>> the documentation was apparently changed for 4.0 in 2015 to reflect the
>>>>>> current behaviour:
>>>>>>
>>>>>> https://github.com/apache/cayenne/commit/5bb12cd36f0d87e3b217cdc20c22a0
>>>>>> f6dc9613f3#diff-5b9a57288e30ef9855d80a63a812ec4f
>>>>>>
>>>>>> Cheers,
>>>>>> - hugi
>>>>>>
>>>>>>
>>>>>>> On 1. mar. 2017, at 14:59, Michael Gentry wrote:
>>>>>>>
>>>>>>> Hi Hugi,
>>>>>>>
>>>>>>> If validateForInsert() is being called before PrePersist, we have a
>>>>>>> disconnect between the documentation and the behavior you are seeing:
>>>>>>>
>>>>>>> "PrePersist: right before a new object is committed, inside
>>>>>>> ObjectContext.commitChanges() and ObjectContext.commitChangesToParent()
>>>>>>> (and prior to validateForInsert())."
>>>>>>>
>>>>>>> What version of Cayenne are you using? I wonder if something has > >
>>>>>>> changed
>>>>>>> or if the documentation is just wrong.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> mrg
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Mar 1, 2017 at 6:18 AM, Hugi Thordarson
>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>> I have some logic in a Listener that uses @PrePersist to populate the
>>>>>>>> value of a required attribute before committing changes. Turns out >>
>>>>>>>> this
>>>>>>>> doesn’t work, since Cayenne invokes validateForInsert() before running
>>>>>>>> @PrePersist.
>>>>>>>>
>>>>>>>> Any suggestions for where I can invoke logic populates required values
>>>>>>>> before validation?
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> - hugi
>>>>>>
>>>>>
>>>>
>>
>
--
Best regards,
Nikita Timofeev
te:
> Hi all,
> what is the proper way to have ServerRuntime.newContext() return my own
> implementation of ObjectContext? (inheriting from DataContext). Any reason
> why that would be discouraged?
>
> Cheers,
> - hugi
--
Best regards,
Nikita Timofeev
1 - 100 of 101 matches
Mail list logo