Re: [jira] [Resolved] (DELTASPIKE-898) Make documentation structure more comprehensible

2015-05-13 Thread Ron Smeral
Hi Dan,

the monitor.rb sure might come in handy, thanks!

I was struggling to find a resonable way to write asciidoc. I currently
settled on Atom with asciidoc plugin which is still somewhat clunky, or
the asciidocfx editor. Both have a live preview feature, so I only build
the docs once I'm done editing just to check if links work. I admit
though that the monitor.rb workflow may be still faster.

The only feature I miss is some kind of an outline or structure
view, showing the structure of the document (at least the headers) for
easier navigation in long documents. Haven't yet found an editor which
would do this for asciidoc.


Thanks,

Ron


On 13.5.2015 07:52, Dan Haywood wrote:
 Ron/others,
 
 Great to see this new Asciidoc work going on.
 
 In case you missed it...  to improve workflow I developed a little
 monitor.rb Ruby script that will automatically regenerate all .adoc's,
 also serves up the files and monitors changes.  It makes for a really nice
 workflow.
 
 For details, see [1] (corresponds directly to your own [2]).
 
 Feel free to rip-off/improve.
 
 Cheers
 Dan
 
 [1] https://github.com/apache/isis/tree/master/adocs/documentation
 [2] https://github.com/apache/deltaspike/tree/master/documentation
 
 
 On 12 May 2015 at 19:49, Ron Smeral (JIRA) j...@apache.org wrote:
 

  [
 https://issues.apache.org/jira/browse/DELTASPIKE-898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

 Ron Smeral resolved DELTASPIKE-898.
 ---
 Resolution: Fixed

 Pushed and published.


 https://git-wip-us.apache.org/repos/asf?p=deltaspike.git;a=commit;h=e67d64a247d110db8e4f51ba8eb403e28c05710f

 Make documentation structure more comprehensible
 

 Key: DELTASPIKE-898
 URL:
 https://issues.apache.org/jira/browse/DELTASPIKE-898
 Project: DeltaSpike
  Issue Type: Improvement
  Components: Documentation
Reporter: Ron Smeral
Assignee: Ron Smeral
Priority: Minor

 Add/remove/adjust headings in documentation so that the TOC shows the
 structure of the document immediately without hiding it.



 --
 This message was sent by Atlassian JIRA
 (v6.3.4#6332)

 

-- 
Ron Smeral
JBoss Quality Engineer
Brno


[jira] [Updated] (DELTASPIKE-902) Test for EntityRepository#removeAndFlush(entity)

2015-05-13 Thread Daniel Cunha (soro) (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Cunha (soro) updated DELTASPIKE-902:
---
Affects Version/s: 1.3.0

 Test for EntityRepository#removeAndFlush(entity)
 

 Key: DELTASPIKE-902
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-902
 Project: DeltaSpike
  Issue Type: Test
  Components: Data-Module
Affects Versions: 1.3.0
Reporter: Daniel Cunha (soro)
Priority: Minor
 Attachments: DELTASPIKE-902.patch






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: CriteriaSupport API

2015-05-13 Thread Thomas Hug
Hi Daniel
I definitely don't have as much time for DS as I'd like to have (right now
close to none ;) so any help is welcome :). Let me know if you have any
specific issue in mind and we can check what's needed.
Cheers,
Thomas

On Wed, May 13, 2015 at 12:13 AM, Daniel Cunha daniels...@gmail.com wrote:

 Hi Thomas,

 I can to see that we have some issues opened and not fixed if you want I
 can try help you with this tasks.
 Let me know if you need help to fix another issues in data-module. :)

 On Mon, May 11, 2015 at 4:55 AM, Thomas Hug thomas@gmail.com wrote:

  Hi Daniel
 
  Thanks for the patch! I should have some bandwidth the next week to do
 some
  DS coding and take care about it.
  There's indeed room for improvement for the criteria API. I was not
 really
  sure how useful people find it and started with a simplified version, but
  if it gets more adoption it's definitely worth filling the gaps. Feedback
  and PRs always welcome :)
 
  Cheers,
  Thomas
 
  On Fri, May 8, 2015 at 10:51 PM, Daniel Cunha daniels...@gmail.com
  wrote:
 
   Hi folks,
  
   I started to change something in data-module, I don't know if we have
  time
   to do it, but, let me know if DELTASPIKE-894 could be apply in next
   release.
  
   We don't support all methods. Do we want support for all methods?
   I can to see that some methods like 'isTrue', 'isFalse', etc.. of the
   Criteria not is supported by DS data-module.
  
   --
   Best regard,
   Daniel Cunha (soro)
  
 



 --
 Best regard,
 Daniel Cunha (soro)



Re: CriteriaSupport API

2015-05-13 Thread Daniel Cunha
Hi Thomas,

I'm looking to DELTASPIKE-701 and DELTASPIKE-603
I'm preparing to start with DELTASPIKE-603. Do you have something for it or
did something?
I would like to fix it, if you don't have time to do. :)

On Wed, May 13, 2015 at 1:00 PM, Thomas Hug thomas@gmail.com wrote:

 Hi Daniel
 I definitely don't have as much time for DS as I'd like to have (right now
 close to none ;) so any help is welcome :). Let me know if you have any
 specific issue in mind and we can check what's needed.
 Cheers,
 Thomas

 On Wed, May 13, 2015 at 12:13 AM, Daniel Cunha daniels...@gmail.com
 wrote:

  Hi Thomas,
 
  I can to see that we have some issues opened and not fixed if you want I
  can try help you with this tasks.
  Let me know if you need help to fix another issues in data-module. :)
 
  On Mon, May 11, 2015 at 4:55 AM, Thomas Hug thomas@gmail.com
 wrote:
 
   Hi Daniel
  
   Thanks for the patch! I should have some bandwidth the next week to do
  some
   DS coding and take care about it.
   There's indeed room for improvement for the criteria API. I was not
  really
   sure how useful people find it and started with a simplified version,
 but
   if it gets more adoption it's definitely worth filling the gaps.
 Feedback
   and PRs always welcome :)
  
   Cheers,
   Thomas
  
   On Fri, May 8, 2015 at 10:51 PM, Daniel Cunha daniels...@gmail.com
   wrote:
  
Hi folks,
   
I started to change something in data-module, I don't know if we have
   time
to do it, but, let me know if DELTASPIKE-894 could be apply in next
release.
   
We don't support all methods. Do we want support for all methods?
I can to see that some methods like 'isTrue', 'isFalse', etc.. of the
Criteria not is supported by DS data-module.
   
--
Best regard,
Daniel Cunha (soro)
   
  
 
 
 
  --
  Best regard,
  Daniel Cunha (soro)
 




-- 
Best regard,
Daniel Cunha (soro)


[jira] [Commented] (DELTASPIKE-816) document usage of multiple entity-managers

2015-05-13 Thread Gerhard Petracek (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14542197#comment-14542197
 ] 

Gerhard Petracek commented on DELTASPIKE-816:
-

@ron:
no the jpa module is e.g. about 
@org.apache.deltaspike.jpa.api.transaction.Transactional and those producers 
are needed (one of those) if you would like to use @Transactional with multiple 
persistence-units.

 document usage of multiple entity-managers
 --

 Key: DELTASPIKE-816
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-816
 Project: DeltaSpike
  Issue Type: Task
  Components: Documentation
Affects Versions: 1.2.1
Reporter: Gerhard Petracek
Assignee: Ron Smeral
 Fix For: 1.4.0


 #1) application-managed via @PersistenceUnitName:
 {code}
 @ApplicationScoped
 public class MultiEntityManagerProducer
 {
 @Inject
 @PersistenceUnitName(puA)
 private EntityManagerFactory emfA;
 @Inject
 @PersistenceUnitName(puB)
 private EntityManagerFactory emfB;
 @Produces
 //e.g.: @RequestScoped
 @DbA //custom qualifier annotation
 public EntityManager createEntityManagerA()
 {
 return emfA.createEntityManager();
 }
 public void closeEmA(@Disposes @DbA EntityManager em)
 {
 em.close();
 }
 @Produces
 //e.g.: @RequestScoped
 @DbB //custom qualifier annotation
 public EntityManager createEntityManagerB()
 {
 return emfB.createEntityManager();
 }
 public void closeEmB(@Disposes @DbB EntityManager em)
 {
 em.close();
 }
 }
 {code}
 or
 #2) select from multiple container-managed em-managers based on the 
 InjectionPoint:
 {code}
 public class EntityManagerSelector
 {
 @PersistenceContext(unitName = firstDB)
 private EntityManager firstEntityManager;
 @PersistenceContext(unitName = secondDB)
 private EntityManager secondEntityManager;
 @Produces
 protected EntityManager createEntityManager(InjectionPoint injectionPoint)
 {
 CustomQualifier customQualifier = 
 injectionPoint.getAnnotated().getAnnotation(CustomQualifier.class);
 return selectEntityManager(customQualifier); //selects 
 firstEntityManager or secondEntityManager based on the details provided by 
 CustomQualifier
 }
 //...
 }
 {code}
 or
 #3) select from multiple container-managed em-managers based on a custom 
 context:
 {code}
 public class EntityManagerSelector
 {
 @PersistenceContext(unitName = firstDB)
 private EntityManager firstEntityManager;
 @PersistenceContext(unitName = secondDB)
 private EntityManager secondEntityManager;
 @Inject
 private CustomDatabaseContext customDatabaseContext;
 @Produces
 protected EntityManager createEntityManager()
 {
 if (customDatabaseContext.usePrimaryDb()) {
 return firstEntityManager;
 }
 return secondEntityManager;
 }
 //...
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (DELTASPIKE-901) org.apache.deltaspike.data.impl.builder.postprocessor.CountQueryPostProcessor doesn't respect order by

2015-05-13 Thread Romain Manni-Bucau (JIRA)
Romain Manni-Bucau created DELTASPIKE-901:
-

 Summary: 
org.apache.deltaspike.data.impl.builder.postprocessor.CountQueryPostProcessor 
doesn't respect order by
 Key: DELTASPIKE-901
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-901
 Project: DeltaSpike
  Issue Type: Bug
Affects Versions: 1.3.0
Reporter: Romain Manni-Bucau


using select p from MyEntity p order by p.someString

and

{code}
@Query(named = MyEntity.findAll)
QueryResultMyEntity all(@FirstResult int start, @MaxResults int pageSize);
{code}

I get 

{code}
org.apache.openjpa.lib.jdbc.ReportingSQLException: expression not in aggregate 
or GROUP BY columns: T0.PROPERTY_KEY {SELECT COUNT(t0.property_key), 
t0.property_key FROM properties t0} [code=-5574, state=42574]
{code}

the count post processor doesn't handle the order by correctly.

Wonder if we should add order by parameters in the select clause or just ignore 
it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DELTASPIKE-701) Add method in EntityRepository to merge a detached entity and remove it

2015-05-13 Thread Daniel Cunha (soro) (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Cunha (soro) updated DELTASPIKE-701:
---
Attachment: DELTASPIKE-701.patch

 Add method in EntityRepository to merge a detached entity and remove it
 ---

 Key: DELTASPIKE-701
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-701
 Project: DeltaSpike
  Issue Type: Improvement
  Components: Data-Module
Reporter: Juliano Marques
Assignee: Thomas Hug
 Attachments: DELTASPIKE-701.patch


 It will be nice if EntityRepository has a method like:
 public void attachAndRemove(Entity entity) {
 if (entityManager.contains(entity)) {
 entityManager.remove(entity);
 } else {
 entityManager.remove(entityManager.merge(entity));
 }
 }
 This method will be useful to handle java.lang.IllegalArgumentException: 
 Removing a detached instance exceptions.
 Workaround: Create a query delegate with this method.
 http://mail-archives.apache.org/mod_mbox/deltaspike-users/201408.mbox/%3CCAAuOd%3DXhb%3D-ssdzU%3DTdxWg8d18XXC15U7EjNiGya9eEgaA%2BUpA%40mail.gmail.com%3E



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DELTASPIKE-701) Add method in EntityRepository to merge a detached entity and remove it

2015-05-13 Thread Rafael Benevides (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14542322#comment-14542322
 ] 

Rafael Benevides commented on DELTASPIKE-701:
-

Patch reviewed. It's good to go

 Add method in EntityRepository to merge a detached entity and remove it
 ---

 Key: DELTASPIKE-701
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-701
 Project: DeltaSpike
  Issue Type: Improvement
  Components: Data-Module
Reporter: Juliano Marques
Assignee: Thomas Hug
 Attachments: DELTASPIKE-701.patch


 It will be nice if EntityRepository has a method like:
 public void attachAndRemove(Entity entity) {
 if (entityManager.contains(entity)) {
 entityManager.remove(entity);
 } else {
 entityManager.remove(entityManager.merge(entity));
 }
 }
 This method will be useful to handle java.lang.IllegalArgumentException: 
 Removing a detached instance exceptions.
 Workaround: Create a query delegate with this method.
 http://mail-archives.apache.org/mod_mbox/deltaspike-users/201408.mbox/%3CCAAuOd%3DXhb%3D-ssdzU%3DTdxWg8d18XXC15U7EjNiGya9eEgaA%2BUpA%40mail.gmail.com%3E



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DELTASPIKE-894) Trim for CriteriaSupport API

2015-05-13 Thread Rafael Benevides (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14542334#comment-14542334
 ] 

Rafael Benevides commented on DELTASPIKE-894:
-

It looks ok but I'd like a second opinion here on the API.

 Trim for CriteriaSupport API
 

 Key: DELTASPIKE-894
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-894
 Project: DeltaSpike
  Issue Type: New Feature
  Components: Data-Module
Reporter: Daniel Cunha (soro)
Assignee: Thomas Hug
Priority: Minor
 Attachments: DELTASPIKE-894.patch






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (DELTASPIKE-902) Test for EntityRepository#removeAndFlush(entity)

2015-05-13 Thread Daniel Cunha (soro) (JIRA)
Daniel Cunha (soro) created DELTASPIKE-902:
--

 Summary: Test for EntityRepository#removeAndFlush(entity)
 Key: DELTASPIKE-902
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-902
 Project: DeltaSpike
  Issue Type: Test
Reporter: Daniel Cunha (soro)
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DELTASPIKE-902) Test for EntityRepository#removeAndFlush(entity)

2015-05-13 Thread Daniel Cunha (soro) (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Cunha (soro) updated DELTASPIKE-902:
---
Attachment: DELTASPIKE-902.patch

 Test for EntityRepository#removeAndFlush(entity)
 

 Key: DELTASPIKE-902
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-902
 Project: DeltaSpike
  Issue Type: Test
Reporter: Daniel Cunha (soro)
Priority: Minor
 Attachments: DELTASPIKE-902.patch






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DELTASPIKE-902) Test for EntityRepository#removeAndFlush(entity)

2015-05-13 Thread Daniel Cunha (soro) (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Cunha (soro) updated DELTASPIKE-902:
---
Component/s: Data-Module

 Test for EntityRepository#removeAndFlush(entity)
 

 Key: DELTASPIKE-902
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-902
 Project: DeltaSpike
  Issue Type: Test
  Components: Data-Module
Affects Versions: 1.3.0
Reporter: Daniel Cunha (soro)
Priority: Minor
 Attachments: DELTASPIKE-902.patch






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)